diff options
author | Jonathon Anderson <17242663+blue42u@users.noreply.github.com> | 2023-01-10 06:36:12 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-10 13:36:12 +0100 |
commit | 6879c35d1c7cdb479d578b219b3cdd4c0139d950 (patch) | |
tree | d5ef1003f9a4ecb5b19b596a7bcdb4fce1dfc09b /.readthedocs.yml | |
parent | f1b8bc97f0414d335344852f744c5a1186738f32 (diff) | |
download | spack-6879c35d1c7cdb479d578b219b3cdd4c0139d950.tar.gz spack-6879c35d1c7cdb479d578b219b3cdd4c0139d950.tar.bz2 spack-6879c35d1c7cdb479d578b219b3cdd4c0139d950.tar.xz spack-6879c35d1c7cdb479d578b219b3cdd4c0139d950.zip |
FileCache: Delete the new cache file on exception (#34623)
The code in FileCache for write_transaction attempts to delete the temporary file when an exception occurs under the context by calling shutil.rmtree. However, rmtree only operates on directories while the rest of FileCache uses normal files. This causes an empty file to be written to the cache key when unneeded.
Use os.remove instead which operates on normal files.
Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com>
Diffstat (limited to '.readthedocs.yml')
0 files changed, 0 insertions, 0 deletions