fabric-loader icon indicating copy to clipboard operation
fabric-loader copied to clipboard

Fix failing to delete temporary remapping files

Open tomwmth opened this issue 1 year ago • 1 comments

Fixes #920

Not sure how to unit test this but I am open to suggestions

tomwmth avatar Jun 08 '24 03:06 tomwmth

As discussed in the issue, I believe it might be a good idea to simply remove (or empty) the tmp directory used for remapping (if it exists) whenever the remapping begins.

There is no attempt made to reuse these temporary files, nor do I think there should be. However this means if deletion ever fails for whatever reason (e.g. process terminated early) the files are now permanently there unless manually deleted by the user. The directory can be safely removed whenever remapping begins to ensure any stray temporary files from previous executions are deleted.

tomwmth avatar Jun 08 '24 03:06 tomwmth

Superseeded by: https://github.com/FabricMC/fabric-loader/pull/936 thanks for the PR.

modmuss50 avatar Jul 09 '24 17:07 modmuss50