forked from SteamWar/SteamWar
Fix BackupCommand
Fix FixedRegion
This commit is contained in:
+3
-3
@@ -100,10 +100,10 @@ public class FixedRegion implements Region {
|
||||
@Nullable
|
||||
@Override
|
||||
public Backup get(String name) {
|
||||
final File definedBackupFolder = new File(new File(backupFolder, prototype.getName()), name);
|
||||
final File definedBackupFolder = new File(new File(backupFolder, prototype.getName()), FixedRegion.this.name);
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
definedBackupFolder.mkdirs();
|
||||
File[] files = definedBackupFolder.listFiles((dir, s) -> s.equals(name + ".schem"));
|
||||
File[] files = definedBackupFolder.listFiles((dir, s) -> s.equals(name.replace('_', ' ') + ".schem"));
|
||||
if (files == null || files.length == 0) return null;
|
||||
return new BackupImpl(files[0]);
|
||||
}
|
||||
@@ -114,7 +114,7 @@ public class FixedRegion implements Region {
|
||||
private final File file;
|
||||
|
||||
public BackupImpl(File file) {
|
||||
super(RegionBackups.BackupType.AUTOMATIC, file.getName(), flagStorage);
|
||||
super(RegionBackups.BackupType.AUTOMATIC, file.getName().replace(' ', '_'), flagStorage);
|
||||
this.file = file;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user