Просмотр исходного кода

Patch by Sascha Lüdecke to sort files in logdirs properly

Morten Brix Pedersen 25 лет назад
Родитель
Сommit
203eb374b4
3 измененных файлов с 5 добавлено и 3 удалено
  1. 1 1
      CREDITS
  2. 3 1
      Changelog
  3. 1 1
      pisg.pl

+ 1 - 1
CREDITS

@@ -46,7 +46,7 @@ And all the other contributors:
  * Andreas Blaafladt <coronel@dalnet.no>
    | Norweigan translation
  * Sascha Lüdecke <sascha@meta-x.de>
-   | Compressed files, and addition of --prefix
+   | Compressed files, addition of --prefix, and sorting of files in logdirs
  * JaMiR0W <jamirow@ig.com.br>
    | Portugese translation
  * Hanno Hecker (Vetinari) <hanno-pisg@bee.de>

+ 3 - 1
Changelog

@@ -1,6 +1,8 @@
 pisg (0.22)
    * pisg.cfg now supports regexs in user.cfg when 'regexp_aliases' is
-     enabled.
+     enabled. (thanks, Phil Gregory)
+   * When using logdirs, files is now sorted properly, so files is read in the
+     right order (thanks, Sascha Lüdecke)
 
 pisg (0.21) - Mon, Aug 27th 2001
    * Fix stupid legend bug; 0-6 should be 0-5, and 7-11 should be 6-11.

+ 1 - 1
pisg.pl

@@ -414,7 +414,7 @@ sub parse_dir
     @filesarray = grep { /^[^\.]/ && /^$conf->{prefix}/ && -f "$conf->{logdir}/$_" } readdir(LOGDIR) or die("No files in \"$conf->{logdir}\" matched prefix \"$conf->{prefix}\"");
     close(LOGDIR);
     
-    foreach my $file (@filesarray) {
+    foreach my $file (sort @filesarray) {
         $file = $conf->{logdir} . $file;
         parse_file($file);
     }