[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src game.cpp
From: |
Guillaume Melquiond |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src game.cpp |
Date: |
Sat, 07 May 2005 06:03:54 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Guillaume Melquiond <address@hidden> 05/05/07 10:03:54
Modified files:
src : game.cpp
Log message:
Don't create a cache if there were parsing errors. Otherwise they will
get lost, and may prevent any further start of the game.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/game.cpp.diff?tr1=1.241&tr2=1.242&r1=text&r2=text
Patches:
Index: wesnoth/src/game.cpp
diff -u wesnoth/src/game.cpp:1.241 wesnoth/src/game.cpp:1.242
--- wesnoth/src/game.cpp:1.241 Wed May 4 03:16:39 2005
+++ wesnoth/src/game.cpp Sat May 7 10:03:53 2005
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.241 2005/05/04 03:16:39 Sirp Exp $ */
+/* $Id: game.cpp,v 1.242 2005/05/07 10:03:53 silene Exp $ */
/*
Copyright (C) 2003 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://wesnoth.whitevine.net
@@ -1252,16 +1252,17 @@
_("Warning: Errors
occurred while loading game configuration files: '") +
error_log);
- }
- try {
- scoped_ostream cache =
ostream_file(fname);
- write_compressed(*cache, cfg);
- config checksum_cfg;
-
data_tree_checksum().write(checksum_cfg);
- scoped_ostream checksum =
ostream_file(fname_checksum);
- write(*checksum, checksum_cfg);
- } catch(io_exception&) {
- std::cerr << "could not write to cache
'" << fname << "'\n";
+ } else {
+ try {
+ scoped_ostream cache =
ostream_file(fname);
+ write_compressed(*cache, cfg);
+ config checksum_cfg;
+
data_tree_checksum().write(checksum_cfg);
+ scoped_ostream checksum =
ostream_file(fname_checksum);
+ write(*checksum, checksum_cfg);
+ } catch(io_exception&) {
+ std::cerr << "could not write
to cache '" << fname << "'\n";
+ }
}
return;
- [Wesnoth-cvs-commits] wesnoth/src game.cpp,
Guillaume Melquiond <=