mirror of
https://github.com/StrawberryMaster/wayback-machine-downloader.git
synced 2025-12-17 17:56:44 +00:00
Remove empty files if --all option is not passed
This commit is contained in:
parent
9312c3cff4
commit
9d863b327a
@ -170,6 +170,11 @@ class WaybackMachineDownloader
|
||||
end
|
||||
rescue StandardError => e
|
||||
puts "#{file_url} # #{e}"
|
||||
ensure
|
||||
if File.size(file_path) == 0 and not @all
|
||||
File.delete(file_path)
|
||||
puts "#{file_path} was empty and was removed."
|
||||
end
|
||||
end
|
||||
puts "#{file_url} -> #{file_path} (#{count}/#{file_list_by_timestamp.size})"
|
||||
else
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user