Kaynağa Gözat

u-a: Print an actual error on load open instead of an empty string

Otherwise gettext would return the special msgid for the catalog.
Guillem Jover 17 yıl önce
ebeveyn
işleme
bfcdc34cdf
2 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 5 0
      ChangeLog
  2. 1 1
      scripts/update-alternatives.pl

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2009-03-02  Guillem Jover  <guillem@debian.org>
+
+	* scripts/update-alternatives.pl (load): Print an actual error on open
+	instead of an empty string.
+
 2009-03-02  Guillem Jover  <guillem@debian.org>
 
 	* scripts/update-alternatives.pl: Do not use non-ASCII strings on C

+ 1 - 1
scripts/update-alternatives.pl

@@ -748,7 +748,7 @@ sub load {
     my ($self, $file, $must_not_die) = @_;
     return 0 unless -s $file;
     eval {
-        open(my $fh, "<", $file) || error(_g(""), $file, $!);
+        open(my $fh, "<", $file) || error(_g("unable to read %s: %s"), $file, $!);
         config_helper($fh, $file);
 	my $status = gl(_g("status"));
 	badfmt(_g("invalid status")) unless $status =~ /^(?:auto|manual)$/;