=================================================================== RCS file: /cvs/openbsd/OpenBSDTorrents/lib/OpenBSDTorrents.pm,v retrieving revision 1.2 retrieving revision 1.4 diff -u -r1.2 -r1.4 --- openbsd/OpenBSDTorrents/lib/OpenBSDTorrents.pm 2005/03/22 23:44:43 1.2 +++ openbsd/OpenBSDTorrents/lib/OpenBSDTorrents.pm 2005/03/24 19:51:50 1.4 @@ -1,5 +1,5 @@ package OpenBSDTorrents; -#$Id: OpenBSDTorrents.pm,v 1.2 2005/03/22 23:44:43 andrew Exp $ +#$Id: OpenBSDTorrents.pm,v 1.4 2005/03/24 19:51:50 andrew Exp $ use 5.008005; use strict; use warnings; @@ -19,10 +19,10 @@ &Get_Files_and_Dirs ); -our $BaseDir = '/home/ftp/pub'; -our $TorrentDir = '/home/andrew/torrents'; -our $BaseName = 'OpenBSD'; -our $Tracker = 'http://OpenBSD.somedomain.net/announce.php'; +our $BaseDir = '/home/ftp/pub'; +our $TorrentDir = '/home/andrew/torrents'; +our $BaseName = 'OpenBSD'; +our $Tracker = 'http://OpenBSD.somedomain.net/announce.php'; # These are regexes that tell what files to skip; our $SkipDirs = qr/\/patches$/; @@ -47,7 +47,7 @@ { my $basedir = shift; opendir DIR, $basedir or die "Couldn't opendir $basedir: $!"; - my @contents = grep { ! /^\.\.$/ } grep { ! /^\.$/ } readdir DIR; + my @contents = sort grep { ! /^\.\.$/ } grep { ! /^\.$/ } readdir DIR; closedir DIR; my @dirs = grep { -d "$basedir/$_" } @contents;