hopefully fix assets generation

This commit is contained in:
Bixilon 2020-12-02 21:55:14 +01:00
parent f7e0beb537
commit 198ae51750
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -282,6 +282,9 @@ public class AssetsManager {
// move file to desired destination
File outputFile = new File(getAssetDiskPath(hash));
Util.createParentFolderIfNotExist(outputFile);
if (outputFile.exists()) {
return hash;
}
if (!tempDestinationFile.renameTo(outputFile)) {
throw new RuntimeException(String.format("Could not rename file %s to %s", tempDestinationFile.getAbsolutePath(), outputFile.getAbsolutePath()));
}