Revision: 58
Author: matt
Date: 2006-08-07 18:06:27 +0000 (Mon, 07 Aug 2006)
Log Message:
-----------
Sort directory listings
Modified Paths:
--------------
trunk/plugins/dir_to_xml
Modified: trunk/plugins/dir_to_xml
===================================================================
--- trunk/plugins/dir_to_xml 2006-08-07 16:04:08 UTC (rev 57)
+++ trunk/plugins/dir_to_xml 2006-08-07 18:06:27 UTC (rev 58)
@@ -29,7 +29,7 @@
my $output = '<?xml version="1.0" encoding="UTF-8"?>
<filelist xmlns="http://axkit.org/2002/filelist">
';
- while(my $line = readdir(DIR)) {
+ for my $line (sort readdir(DIR)) {
my $xmlline = _to_utf8($enc, $line);
$xmlline =~ s/&/&/;
$xmlline =~ s/</</;
@@ -58,4 +58,4 @@
my ($enc, $line) = @_;
# NB: We croak because it's useless returning a dir we can't convert
return Encode::decode($enc, $line, Encode::FB_CROAK);
-}
\ No newline at end of file
+}