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?
|
||||
begin
|
||||
curl @url, '-o', @dl
|
||||
rescue
|
||||
@dl.unlink
|
||||
rescue Exception
|
||||
@dl.unlink if @dl.exist?
|
||||
raise
|
||||
end
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user