salpland / haze

☘️ A simple command line tool to manage your Minecraft Bedrock worlds
MIT License
4 stars 3 forks source link

Deleting files before exporting/importing #15

Closed Nusiq closed 1 month ago

Nusiq commented 1 month ago

This PR fixes the issue of Haze not cleaning the directories before overwriting them with the new files (during the import and export operations).

It also adds a test for the world files being used during the import command (the world shouldn't be opened in Minecraft when you import the files to your repository because this may cause importing files in invalid state).

The tests for the directory being used aren't perfectly safe. The directories are tested first (one file at a time) and than everything is deleted. It is possible that some program will start using some files in the directory after the tests are made and before the deletion.


Closes #14

arexon commented 1 month ago

Thanks for the PR! I'm in the middle of rewriting Haze at the moment, so I won't be able to merge this unfortunately.

Nusiq commented 1 month ago

No worries. I'm currently using that version for my workflow. When the official one will be released I'll switch to that.