mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-12 02:09:46 +00:00
Changed: #1023 Use a standard application path for writing files
This commit is contained in:
parent
872fddd93c
commit
f5a4fc8d9e
1 changed files with 3 additions and 5 deletions
|
@ -115,12 +115,11 @@ namespace STRING_MANAGER
|
||||||
{
|
{
|
||||||
try
|
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 (CFile::fileExists(_CacheFilename))
|
||||||
if (!_CacheFilename .empty())
|
|
||||||
{
|
{
|
||||||
// there is a cache file, check date reset it if needed
|
// there is a cache file, check date reset it if needed
|
||||||
{
|
{
|
||||||
|
@ -143,7 +142,6 @@ namespace STRING_MANAGER
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
nlinfo("SM: Creating string cache");
|
nlinfo("SM: Creating string cache");
|
||||||
_CacheFilename = std::string("data/")+filename;
|
|
||||||
// cache file don't exist, create it with the timestamp
|
// cache file don't exist, create it with the timestamp
|
||||||
NLMISC::COFile file(_CacheFilename);
|
NLMISC::COFile file(_CacheFilename);
|
||||||
file.serial(timestamp);
|
file.serial(timestamp);
|
||||||
|
|
Loading…
Reference in a new issue