[gnome-chess] Never autosave over a user's files
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess] Never autosave over a user's files
- Date: Mon, 6 Jan 2014 23:59:55 +0000 (UTC)
commit 4e17def0fbc5e00a1493d4aaca20464eb2134e70
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Mon Jan 6 17:03:37 2014 -0600
Never autosave over a user's files
We should only ever be autosaving to the single autosave file.
src/gnome-chess.vala | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index a6e3e76..dbcd651 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -342,12 +342,10 @@ public class Application : Gtk.Application
try
{
- if (!in_history || game_file == null)
- game_file = File.new_for_path (autosave_filename);
-
- debug ("Writing current game to %s", game_file.get_path ());
+ var autosave_file = File.new_for_path (autosave_filename);
+ debug ("Writing current game to %s", autosave_file.get_path ());
update_pgn_time_remaining ();
- pgn_game.write (game_file);
+ pgn_game.write (autosave_file);
}
catch (Error e)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]