Commit c823e5bd authored by Leigh B Stoller's avatar Leigh B Stoller

Bug Fix: remove ndz file after failed fetch.

parent 51d9a87b
......@@ -255,8 +255,10 @@ foreach my $imageid (keys(%{ $xmlparse->{'image'} })) {
unlink($tmpfilename)
if (-e $tmpfilename);
print "Fetching $imageurl\n";
system("$FETCH -o $tmpfilename $imageurl") == 0
or fatal("Could not fetch $imageurl");
if (system("$FETCH -o $tmpfilename $imageurl")) {
unlink($tmpfilename);
fatal("Could not fetch $imageurl");
}
#
# Do an integrity check.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment