mail[Wesnoth-commits] r33470 - /trunk/src/config_cache.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by kailoran on March 08, 2009 - 21:04:
Author: ilor
Date: Sun Mar  8 21:04:25 2009
New Revision: 33470

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33470&view=rev
Log:
avoid using the : character in the cache archive file name (when the game 
version string contains a revision range) as it's not a good idea e.g. on 
windows

Modified:
    trunk/src/config_cache.cpp

Modified: trunk/src/config_cache.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/config_cache.cpp?rev=33470&r1=33469&r2=33470&view=diff
==============================================================================
--- trunk/src/config_cache.cpp (original)
+++ trunk/src/config_cache.cpp Sun Mar  8 21:04:25 2009
@@ -28,6 +28,7 @@
 #include "serialization/parser.hpp"
 
 #include <boost/bind.hpp>
+#include <boost/algorithm/string/replace.hpp>
 
 #define ERR_CACHE LOG_STREAM(err, cache)
 #define LOG_CACHE LOG_STREAM(info, cache)
@@ -191,7 +192,9 @@
                        const std::string& cache = get_cache_dir();
                        if(cache != "") {
                                sha1_hash sha(defines_string.str()); // use a 
hash for a shorter display of the defines
-                               const std::string fname = cache + "/cache-v" 
+ game_config::revision + "-" + sha.display();
+                               const std::string fname = cache + "/cache-v" 
+ 
+                                       
boost::algorithm::replace_all_copy(game_config::revision, ":", "_") + 
+                                       "-" + sha.display();
                                const std::string fname_checksum = fname + 
".checksum" + extension;
 
                                file_tree_checksum dir_checksum;




Related Messages


Powered by MHonArc, Updated Sun Mar 08 21:20:35 2009