FabricMC / fabric-loader

Fabric's mostly-version-independent mod loader.
Apache License 2.0
617 stars 262 forks source link

Fix failing to delete temporary remapping files #935

Closed tomwmth closed 2 months ago

tomwmth commented 3 months ago

Fixes #920

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

tomwmth commented 3 months ago

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.

modmuss50 commented 2 months ago

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