From f5a4fc8d9e224fb43dfc5fd7e843dd6e7e2b26e5 Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 5 Oct 2010 21:20:01 +0200 Subject: [PATCH] Changed: #1023 Use a standard application path for writing files --- code/ryzom/client/src/string_manager_client.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/ryzom/client/src/string_manager_client.cpp b/code/ryzom/client/src/string_manager_client.cpp index 38482c6d7..72604df73 100644 --- a/code/ryzom/client/src/string_manager_client.cpp +++ b/code/ryzom/client/src/string_manager_client.cpp @@ -115,12 +115,11 @@ namespace STRING_MANAGER { try { - std::string filename(_ShardId.substr(0, _ShardId.find(":")) + ".string_cache"); + _CacheFilename = std::string("save/") + _ShardId.substr(0, _ShardId.find(":")) + ".string_cache"; - nlinfo("SM : Try to open the string cache : %s", filename.c_str()); + nlinfo("SM : Try to open the string cache : %s", _CacheFilename.c_str()); - _CacheFilename = NLMISC::CPath::lookup(filename, false, false); - if (!_CacheFilename .empty()) + if (CFile::fileExists(_CacheFilename)) { // there is a cache file, check date reset it if needed { @@ -143,7 +142,6 @@ namespace STRING_MANAGER else { nlinfo("SM: Creating string cache"); - _CacheFilename = std::string("data/")+filename; // cache file don't exist, create it with the timestamp NLMISC::COFile file(_CacheFilename); file.serial(timestamp);