mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 17:56:44 +00:00
Fix case when file wasn't created
This commit is contained in:
parent
5532a6408b
commit
e7fc5a2eb9
@ -171,7 +171,7 @@ class WaybackMachineDownloader
|
||||
rescue StandardError => e
|
||||
puts "#{file_url} # #{e}"
|
||||
ensure
|
||||
if File.size(file_path) == 0 and not @all
|
||||
if not @all and File.exists?(file_path) and File.size(file_path) == 0
|
||||
File.delete(file_path)
|
||||
puts "#{file_path} was empty and was removed."
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user