[Popcon-commits] cvs commit to popularity-contest by pere

pere at cvs.alioth.debian.org pere at cvs.alioth.debian.org
Sun Apr 30 10:44:55 UTC 2006


Update of /cvsroot/popcon/popularity-contest
In directory haydn:/tmp/cvs-serv12961

Modified Files:
	prepop.pl 
Log Message:
Changed prepop.pl to only fail if mkdir fails when the directory is missing in the first place.

Index: prepop.pl
===================================================================
RCS file: /cvsroot/popcon/popularity-contest/prepop.pl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- prepop.pl	1 Feb 2004 16:21:19 -0000	1.1
+++ prepop.pl	30 Apr 2006 10:44:53 -0000	1.2
@@ -38,6 +38,9 @@
        $mtime=int $1; #untaint $mtime;
        $mtime=$now if ($mtime > $now);
        my $dir=substr($id,0,2);
+       unless (-d "$dirname/$dir") {
+         mkdir("$dirname/$dir",0755) or do {$state='reject';next;};
+       };
        $file="$dirname/$dir/$id"; 
        open REPORT, ">",$file or do {$state='reject';next;};
        print REPORT $_;




More information about the Popcon-commits mailing list