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