--- foxridge-archiver/archiver.pl 2004/06/17 15:58:42 1.1 +++ foxridge-archiver/archiver.pl 2004/07/12 15:49:17 1.3 @@ -16,7 +16,7 @@ $|=1; # # program version -my $version = "0.5 (15.1.2004)"; +my $version = "0.5.2 (12.7.2004)"; # rewrite XML file (necessary for archive date!) my $fix_xml = 1; @@ -64,8 +64,10 @@ if ($#ARGV < 0) { exit 1; } my $docdir = $ARGV[0]; +# strip double slashes +$docdir =~ s/\/\//\//; # strip trailing slashes -$docdir =~ s/\/$//; +$docdir =~ s/\/+$//; if (! -d $docdir) { print "ABORT: document directory \'$docdir\' doesn't exist!\n"; exit 1; @@ -376,9 +378,10 @@ if ($errcnt > 0) { } # start archiving -my $archived_files = run_archive; +my $archived_files = run_archive(); +my $num_archfiles = scalar keys %$archived_files; -print "INFO: ", scalar keys %$archived_files, " files archived\n"; +print "INFO: $num_archfiles files archived\n"; # check list of archived files check_files($files_to_archive, $archived_files); @@ -398,7 +401,6 @@ if ($errcnt == 0) { print "INFO: $warncnt warnings\n"; print "INFO: $errcnt errors\n"; -my $num_archfiles = %$archived_files + 1; if ($errcnt > 0) { print "ABORT: there were errors! ($num_archfiles files archived) at ", stime(time), "\n"; exit 1;