Delete the partial download with any exception
Don't delete it if it doesn't exist.
This commit is contained in:
parent
a7315fce20
commit
2149d9035a
@ -39,8 +39,8 @@ class HttpDownloadStrategy <AbstractDownloadStrategy
|
|||||||
unless @dl.exist?
|
unless @dl.exist?
|
||||||
begin
|
begin
|
||||||
curl @url, '-o', @dl
|
curl @url, '-o', @dl
|
||||||
rescue
|
rescue Exception
|
||||||
@dl.unlink
|
@dl.unlink if @dl.exist?
|
||||||
raise
|
raise
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user