v1.2.1: fixed logic with linux save conversion
This commit is contained in:
@@ -145,11 +145,11 @@ public class DesktopLauncher {
|
|||||||
FileHandle oldBase = new Lwjgl3FileHandle(".shatteredpixel/shattered-pixel-dungeon/", Files.FileType.External);
|
FileHandle oldBase = new Lwjgl3FileHandle(".shatteredpixel/shattered-pixel-dungeon/", Files.FileType.External);
|
||||||
FileHandle newBase = new Lwjgl3FileHandle(XDGHome + ".shatteredpixel/shattered-pixel-dungeon/", Files.FileType.External);
|
FileHandle newBase = new Lwjgl3FileHandle(XDGHome + ".shatteredpixel/shattered-pixel-dungeon/", Files.FileType.External);
|
||||||
if (oldBase.exists()){
|
if (oldBase.exists()){
|
||||||
if (newBase.exists()){
|
if (!newBase.exists()) {
|
||||||
oldBase.deleteDirectory();
|
oldBase.copyTo(newBase.parent());
|
||||||
} else {
|
|
||||||
oldBase.moveTo(newBase);
|
|
||||||
}
|
}
|
||||||
|
oldBase.deleteDirectory();
|
||||||
|
oldBase.parent().delete(); //only regular delete, in case of saves from other PD versions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user