fixed bad characters in directories for windows

This commit is contained in:
Niklas Jansson 2017-06-05 12:32:37 +02:00
parent e95ade8079
commit 662ab9eeb7

View File

@ -217,6 +217,7 @@ class WaybackMachineDownloader
file_path = backup_path + file_path_elements[0..-1].join('/')
end
if Gem.win_platform?
dir_path = dir_path.gsub(/[:*?&=<>\\|]/) {|s| '%' + s.ord.to_s(16) }
file_path = file_path.gsub(/[:*?&=<>\\|]/) {|s| '%' + s.ord.to_s(16) }
end
unless File.exists? file_path