From c62f8376a13e7a4f493167aba1c66a9201fc59c6 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Wed, 26 Nov 2025 19:02:28 -0500 Subject: New upstream version 3.0.0. --- lib/roo/tempdir.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/roo/tempdir.rb') diff --git a/lib/roo/tempdir.rb b/lib/roo/tempdir.rb index 4be755b..7ad7989 100644 --- a/lib/roo/tempdir.rb +++ b/lib/roo/tempdir.rb @@ -4,7 +4,10 @@ module Roo if @tempdirs && (dirs_to_remove = @tempdirs[object_id]) @tempdirs.delete(object_id) dirs_to_remove.each do |dir| - ::FileUtils.remove_entry(dir) + # Pass force=true to avoid an exception (and thus warnings in Ruby 3.1) if dir has + # already been removed. This can occur when the finalizer is called both in a forked + # child process and in the parent. + ::FileUtils.remove_entry(dir, true) end end end -- cgit v1.2.3