]> dxcluster.org Git - spider.git/commitdiff
put some basic protection into save and make the default directory packclus
authorminima <minima>
Tue, 8 Jan 2002 11:34:05 +0000 (11:34 +0000)
committerminima <minima>
Tue, 8 Jan 2002 11:34:05 +0000 (11:34 +0000)
cmd/save.pl

index 8d7ece38c9f933fa1fb03c25ff1f2969ff6ef76e..9d49244564954f5bbc89d199c3f25fe381fbd2ff 100644 (file)
@@ -25,6 +25,9 @@ if ($line =~ /-a/) {                  # append to the file
 }
 
 my ($fn, $rest) = split /\s+/, $line, 2;
+$fn = "$main::root/packclus/$fn" unless $fn =~ m|^/|;
+$fn =~ s/..//g;
+$fn =~ m|/+|/|g;
 $fn .= '_' . cldate if $date_req;
 $fn .= '_' . ztime if $time_req;
 $fn =~ s/\s+//g;