Skip to content

Commit

Permalink
Avoid zipping tempfiles as it lacks rename permissions on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje authored and elgatov committed Jun 27, 2022
1 parent 498859d commit 28a5066
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rb/lib/selenium/webdriver/common/zipper.rb
Expand Up @@ -72,7 +72,9 @@ def zip_file(path)
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
Expand Down

0 comments on commit 28a5066

Please sign in to comment.