|
|
|
@ -158,8 +158,8 @@ class PortalDataStore (val logger: Logger) { |
|
|
|
|
|
|
|
|
|
fun onAfterChanged() { |
|
|
|
|
val destination = saveDataTo ?: return |
|
|
|
|
logger.info("Saving updated data to $saveDataTo...") |
|
|
|
|
val tempDestination = File.createTempFile("PortalSaveData", ".tmp.binproto") |
|
|
|
|
logger.info("Saving updated data to $destination...") |
|
|
|
|
val tempDestination = File.createTempFile(destination.nameWithoutExtension, ".tmp.binproto", destination.parentFile) |
|
|
|
|
val backupDestination = useBackup |
|
|
|
|
if (backupDestination != null && destination.exists()) { |
|
|
|
|
backupDestination.delete() |
|
|
|
|