diff --git a/src/main/kotlin/net/deliciousreya/minecraftportal/model/PortalDataStore.kt b/src/main/kotlin/net/deliciousreya/minecraftportal/model/PortalDataStore.kt index c90f344..f113086 100644 --- a/src/main/kotlin/net/deliciousreya/minecraftportal/model/PortalDataStore.kt +++ b/src/main/kotlin/net/deliciousreya/minecraftportal/model/PortalDataStore.kt @@ -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()