mirror of
https://github.com/louis-e/arnis.git
synced 2025-12-23 22:37:56 -05:00
Clean up temp directory after packaging mcworld
This commit is contained in:
@@ -1315,6 +1315,7 @@ mod bedrock_support {
|
||||
self.write_chunks_to_db(world)?;
|
||||
self.write_metadata(world, xzbbox, llbbox)?;
|
||||
self.package_mcworld()?;
|
||||
self.cleanup_temp_dir()?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -1829,6 +1830,14 @@ mod bedrock_support {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Clean up the temporary directory after packaging mcworld
|
||||
fn cleanup_temp_dir(&self) -> Result<(), BedrockSaveError> {
|
||||
if self.output_dir.exists() {
|
||||
fs::remove_dir_all(&self.output_dir)?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn add_directory_to_zip(
|
||||
&self,
|
||||
writer: &mut ZipWriter<File>,
|
||||
|
||||
Reference in New Issue
Block a user