diff --git a/Gemfile.lock b/Gemfile.lock index 7cce5b8..48ecf61 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -301,7 +301,7 @@ GEM sexp_processor (~> 4.0) ruby_parser (3.5.0) sexp_processor (~> 4.1) - rubyzip (1.1.6) + rubyzip (1.1.7) safe_yaml (1.0.4) sass (3.2.19) sass-rails (4.0.3) diff --git a/app/models/project/download.rb b/app/models/project/download.rb index cc87de7..529f4e9 100644 --- a/app/models/project/download.rb +++ b/app/models/project/download.rb @@ -18,7 +18,7 @@ def call http_client.get_content(project.download_zip_url) { |chunk| zip_file.write(chunk) } - rescue_reopen_error { unzip_to_source_files(zip_file) } + unzip_to_source_files(zip_file) end end @@ -28,20 +28,6 @@ def filename "#{project.username}-#{project.name}" end - # Catch and ignore weird `reopen` error message from rubyzip gem - def rescue_reopen_error - begin - return yield - rescue ArgumentError => e - line = e.backtrace.first - if line =~ /reopen/ && e.message =~ /wrong number of arguments \(0 for 1\.\.2\)/ - logger.warn { "While unzipping, ignoring exception: #{e.inspect}" } - else - raise e - end - end - end - # @param file [String] def unzip_to_source_files(file) zipfile = Project::ZipFile.new(file, project: project)