Browse Source

Changed prepop.pl to only fail if mkdir fails when the directory is missing in the first place.

suites/ascii
Petter Reinholdtsen 16 years ago
parent
commit
3915879abe
  1. 4
      debian/changelog
  2. 3
      prepop.pl

4
debian/changelog

@ -4,8 +4,10 @@ popularity-contest (1.34) UNRELEASED; urgency=low
* popcon.pl: add support for favicon.
[Petter Reinholdtsen]
* Change popcon-submit.cgi to only report success when it is able to extract
* Changed popcon-submit.cgi to only report success when it is able to extract
the submitter ID from the report.
* Changed prepop.pl to only fail if mkdir fails when the directory is
missing in the first place.
[ Christian Perrier ]
- Updated Khmer by Khoem Sokhem. (Closes: #359672)

3
prepop.pl

@ -38,6 +38,9 @@ while(<>)
$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 $_;

Loading…
Cancel
Save