Skip to content

Commit 662ab9e

Browse files
committed
fixed bad characters in directories for windows
1 parent e95ade8 commit 662ab9e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/wayback_machine_downloader.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ def download_file file_remote_info
217217
file_path = backup_path + file_path_elements[0..-1].join('/')
218218
end
219219
if Gem.win_platform?
220+
dir_path = dir_path.gsub(/[:*?&=<>\\|]/) {|s| '%' + s.ord.to_s(16) }
220221
file_path = file_path.gsub(/[:*?&=<>\\|]/) {|s| '%' + s.ord.to_s(16) }
221222
end
222223
unless File.exists? file_path

0 commit comments

Comments
 (0)