AsyncWgetFileGetter: create files with wallclock timestamp
[videosite.git] / videosite / AsyncWgetFileGetter.pm
index ce68046..9f330c6 100644 (file)
@@ -54,7 +54,7 @@ sub get {
     my (undef, $tmpfile) = tempfile('videosite.tmp.XXXXXXXXXXXX', DIR => $dirname);
 
     $cookie = "--header=\"Cookie: $video->{'COOKIE'}\"" if (defined $video->{'COOKIE'});
-    my $cmdline = "( wget -q -O\"$tmpfile\" $cookie \"$video->{'DLURL'}\" && mv \"$tmpfile\" \"$dlfile\" && chmod =rw \"$dlfile\" || rm -f \"$tmpfile\" ) &";
+    my $cmdline = "( wget -q -O\"$tmpfile\" $cookie \"$video->{'DLURL'}\" && mv \"$tmpfile\" \"$dlfile\" && chmod =rw \"$dlfile\" && touch \"$dlfile\" || rm -f \"$tmpfile\" ) &";
     $self->debug(encode_base64($cmdline));
     system($cmdline);