mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 07:20:04 -04:00
cleanup temporary assets
This commit is contained in:
parent
198ae51750
commit
4c3abc0a30
@ -283,6 +283,10 @@ public class AssetsManager {
|
||||
File outputFile = new File(getAssetDiskPath(hash));
|
||||
Util.createParentFolderIfNotExist(outputFile);
|
||||
if (outputFile.exists()) {
|
||||
// file is already extracted
|
||||
if (!tempDestinationFile.delete()) {
|
||||
throw new RuntimeException(String.format("Could not delete temporary file %s", tempDestinationFile.getAbsolutePath()));
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
if (!tempDestinationFile.renameTo(outputFile)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user