summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-24 14:52:31 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-24 14:52:31 +0000
commitd42ad95a12aba5f2ca9ef783d904ea731e0a5982 (patch)
tree2f0cc4938914b7256e0f8bdaf6cafddd74443221
parent831e281b689c67f6dc822bd1e633484b8060ae63 (diff)
downloadurpmi-d42ad95a12aba5f2ca9ef783d904ea731e0a5982.tar
urpmi-d42ad95a12aba5f2ca9ef783d904ea731e0a5982.tar.gz
urpmi-d42ad95a12aba5f2ca9ef783d904ea731e0a5982.tar.bz2
urpmi-d42ad95a12aba5f2ca9ef783d904ea731e0a5982.tar.xz
urpmi-d42ad95a12aba5f2ca9ef783d904ea731e0a5982.zip
bugfix: allow empty urpmi.cfg
-rw-r--r--urpm/cfg.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/urpm/cfg.pm b/urpm/cfg.pm
index c6b210ce..5522a999 100644
--- a/urpm/cfg.pm
+++ b/urpm/cfg.pm
@@ -107,7 +107,8 @@ sub load_config ($;$) {
my $priority = 1;
my $medium;
$err = '';
- my @conf_lines = cat_($file) or do { $err = N("unable to read config file [%s]", $file); return };
+ -r $file or do { $err = N("unable to read config file [%s]", $file); return };
+ my @conf_lines = cat_($file);
foreach (@conf_lines) {
chomp;
next if /^\s*#/; #- comments