Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Feb 16, 2025

Pull Request Checklist

Helpful things

Fixes

Fixes #13013

Purpose

Do not try to delete the temporary folder during shutdown if it was never created in the 1st place. Because when trying to delete, it actually tries to create the folder if it was not already created. This is useless and can cause errors with read-only filesystems.

Background Context

I used a simple mutable var as I believe this is enough in this context: the var is private, in a singleton, only set during a lazy val initialization.
However, if you believe we should use an AtomicBoolean, just say it :)

Note that I didn't add test, not sure if this is worth it and I'm not sure how to approach writing such a test.

References

N/A


This is an automatic backport of pull request #13039 done by [Mergify](https://mergify.com).

…ry folder (fix #13013)

With a read-only filesystem, an error was raised during shutdown when trying to delete the temporary
folder because delete would first create the folder if it was not yet created.

fix #13013

(cherry picked from commit 9a452a3)
@mkurz mkurz merged commit 2c10926 into 3.0.x Feb 16, 2025
25 checks passed
@mkurz mkurz deleted the mergify/bp/3.0.x/pr-13039 branch February 16, 2025 11:42
@mkurz mkurz added this to the 3.0.7 milestone Mar 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants