1
0
Fork 0

Make sure to create temporary files in the same directory as the result

main
Mari 4 years ago
parent e21fb535d5
commit f285fa37cc
  1. 4
      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()

Loading…
Cancel
Save