From: Christian Heller Date: Wed, 26 Aug 2015 03:19:28 +0000 (+0200) Subject: Fix replay mode overwriting save file on quit. X-Git-Tag: tce~314 X-Git-Url: https://plomlompom.com/repos/%7B%7B%20web_path%20%7D%7D/decks/%7B%7Bdeck_id%7D%7D/%7B%7Bprefix%7D%7D?a=commitdiff_plain;h=b36bacf2869c51bbbfe628ad431080971fab409c;p=plomrogue Fix replay mode overwriting save file on quit. --- diff --git a/roguelike-server b/roguelike-server index 344f5a5..57f0b6c 100755 --- a/roguelike-server +++ b/roguelike-server @@ -1111,8 +1111,9 @@ def command_ping(): def command_quit(): """Abort server process.""" - save_world() - atomic_write(io_db["path_record"], io_db["record_chunk"], do_append=True) + if None == opts.replay: + save_world() + atomic_write(io_db["path_record"], io_db["record_chunk"], do_append=True) raise SystemExit("received QUIT command")