Avoid zipping tempfiles as it lacks rename permissions on Windows
Fixes
@@ -72,7 +72,9 @@ module Selenium
private
def with_tmp_zip(&blk)
- Tempfile.create do |zip_path|
+ # Don't use Tempfile since it lacks rb_file_s_rename permission on Windows.
+ Dir.mktmpdir do |tmp_dir|
+ zip_path = File.join(tmp_dir, 'webdriver-zip')
Zip::File.open(zip_path, Zip::File::CREATE, &blk)
end
end
