Fix editing a replay twice with the same name (fixes #342)
This commit is contained in:
@@ -120,6 +120,9 @@ public class MarkerProcessor {
|
||||
squashFilter.init(studio, null);
|
||||
|
||||
Path inputPath = path.resolveSibling("raw").resolve(path.getFileName());
|
||||
for (int i = 1; Files.exists(inputPath); i++) {
|
||||
inputPath = inputPath.resolveSibling(replayName + "." + i + ".mcpr");
|
||||
}
|
||||
Files.createDirectories(inputPath.getParent());
|
||||
Files.move(path, inputPath);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user