Do not bother recovering useless replays (fixes #444)
Useless replays being those for which auto-recording was disabled and Start never pressed.
This commit is contained in:
@@ -272,6 +272,10 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
||||
// Immediately close the saving popup, the user doesn't care about it
|
||||
core.runLater(guiSavingReplay::close);
|
||||
|
||||
// If we crash right here, on the next start we'll prompt the user for recovery
|
||||
// but we don't really want that, so drop a marker file to skip recovery for this replay.
|
||||
Files.createFile(outputPath.resolveSibling(outputPath.getFileName() + ".no_recover"));
|
||||
|
||||
// We still have the replay, so we just save it (at least for a few weeks) in case they change their mind
|
||||
String replayName = FilenameUtils.getBaseName(outputPath.getFileName().toString());
|
||||
Path rawFolder = ReplayMod.instance.getRawReplayFolder();
|
||||
|
||||
Reference in New Issue
Block a user