Skip to content

Commit

Permalink
Merge pull request #309 from scientist-softserv/fix-rm_f-call
Browse files Browse the repository at this point in the history
🐛 Favor `FileUtils.rm_f`
  • Loading branch information
kirkkwang authored Dec 7, 2023
2 parents 9f4b130 + 61350ae commit e476998
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ GEM
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
json (2.6.3)
json-canonicalization (0.3.2)
json-canonicalization (0.3.1)
json-ld (3.1.10)
htmlentities (~> 4.3)
json-canonicalization (~> 0.2)
Expand Down Expand Up @@ -997,6 +997,7 @@ DEPENDENCIES
iiif_print!
jbuilder (~> 2.5)
jquery-rails
json-canonicalization (= 0.3.1)
newspaper_works_fixtures (~> 0.3, >= 0.3.1)
puma (~> 3.11)
rails (~> 5.2.8, >= 5.2.8.1)
Expand Down
1 change: 1 addition & 0 deletions iiif_print.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ SUMMARY
# TODO: We want to remove dependency on this
spec.add_development_dependency 'newspaper_works_fixtures', '~> 0.3', '>=0.3.1'
spec.add_development_dependency 'rails-controller-testing', '~> 1'
spec.add_development_dependency 'json-canonicalization', '0.3.1'
spec.add_development_dependency 'rspec-rails'
spec.add_development_dependency 'rspec-activemodel-mocks'
spec.add_development_dependency 'shoulda-matchers', '~> 3.1'
Expand Down
2 changes: 1 addition & 1 deletion lib/iiif_print/jobs/child_works_from_pdf_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def prepare_import_data(original_pdf_path, image_files, user)

begin
# Clean up the temporary image path.
File.rm_f(image_path) if File.exist?(image_path)
FileUtils.rm_f(image_path) if File.exist?(image_path)
rescue
# If we can't delete, let's move on. Maybe it was already cleaned-up.
end
Expand Down

0 comments on commit e476998

Please sign in to comment.