[gnome-chess/gnome-3-10] Never autosave over a user's files
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess/gnome-3-10] Never autosave over a user's files
- Date: Mon, 6 Jan 2014 23:39:27 +0000 (UTC)
commit 944e2bb67aaeab92fcc498272b46f8e39845fcac
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 9a08e1b..beae26c 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -356,12 +356,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]