mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 23:42:35 -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));
|
File outputFile = new File(getAssetDiskPath(hash));
|
||||||
Util.createParentFolderIfNotExist(outputFile);
|
Util.createParentFolderIfNotExist(outputFile);
|
||||||
if (outputFile.exists()) {
|
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;
|
return hash;
|
||||||
}
|
}
|
||||||
if (!tempDestinationFile.renameTo(outputFile)) {
|
if (!tempDestinationFile.renameTo(outputFile)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user