Merge pull request #11 from sigginet/bug-no-8

Fixed bug #8
This commit is contained in:
hartator 2015-09-09 23:57:22 -05:00
commit d1ead1d886

View File

@ -110,7 +110,7 @@ class WaybackMachineDownloader
FileUtils::mkdir_p dir_path unless File.exists? dir_path FileUtils::mkdir_p dir_path unless File.exists? dir_path
rescue Errno::EEXIST => e rescue Errno::EEXIST => e
puts "# #{e}" puts "# #{e}"
file_already_existing = e.to_s.split("File exists @ dir_s_mkdir - ")[-1] file_already_existing = e.to_s.split("File exists - ")[-1]
file_already_existing_temporary = file_already_existing + '.temp' file_already_existing_temporary = file_already_existing + '.temp'
file_already_existing_permanent = file_already_existing + '/index.html' file_already_existing_permanent = file_already_existing + '/index.html'
FileUtils::mv file_already_existing, file_already_existing_temporary FileUtils::mv file_already_existing, file_already_existing_temporary