We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b0ca50 commit ee2c42bCopy full SHA for ee2c42b
tasks/converter/network.rb
@@ -19,7 +19,7 @@ def read_files(path, files)
19
log_http_get_files files, full_path, false
20
files.map do |name|
21
Thread.start {
22
- contents[name] = open("#{full_path}/#{name}").read
+ contents[name] = URI.open("#{full_path}/#{name}").read
23
Thread.exclusive { write_cached_files path, name => contents[name] }
24
}
25
end.each(&:join)
@@ -56,7 +56,7 @@ def get_file(url)
56
File.read(cache_path, mode: 'rb')
57
else
58
log_http_get_file url, false
59
- content = open(url).read
+ content = URI.open(url).read
60
File.open(cache_path, 'wb') { |f| f.write content }
61
content
62
end
0 commit comments