X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/fddd732457ef4b8955fefa105f7e95ba192b705b..4507e28404466c7925afccf31d502436908292c3:/projects/stargazer/plugins/store/files/file_store.cpp diff --git a/projects/stargazer/plugins/store/files/file_store.cpp b/projects/stargazer/plugins/store/files/file_store.cpp index aea3aedc..630dfdef 100644 --- a/projects/stargazer/plugins/store/files/file_store.cpp +++ b/projects/stargazer/plugins/store/files/file_store.cpp @@ -1298,7 +1298,7 @@ strprintf(&fileName, "%s/%s.adm", storeSettings.GetAdminsDir().c_str(), ac.login Touch(fileName + ".new"); { - CONFIGFILE cf(fileName); + CONFIGFILE cf(fileName + ".new"); int e = cf.Error(); @@ -1507,15 +1507,15 @@ return 0; //----------------------------------------------------------------------------- int FILES_STORE::RestoreTariff(TARIFF_DATA * td, const string & tariffName) const { -string tariffFileName = storeSettings.GetTariffsDir() + "/" + tariffName + ".tf"; -CONFIGFILE conf(tariffFileName); +string fileName = storeSettings.GetTariffsDir() + "/" + tariffName + ".tf"; +CONFIGFILE conf(fileName); string str; td->tariffConf.name = tariffName; if (conf.Error() != 0) { STG_LOCKER lock(&mutex, __FILE__, __LINE__); - errorStr = "Cannot read file " + tariffFileName; + errorStr = "Cannot read file " + fileName; printfd(__FILE__, "FILES_STORE::RestoreTariff - failed to read tariff '%s'\n", tariffName.c_str()); return -1; } @@ -1666,7 +1666,7 @@ string fileName = storeSettings.GetTariffsDir() + "/" + tariffName + ".tf"; Touch(fileName + ".new"); { - CONFIGFILE cf(fileName); + CONFIGFILE cf(fileName + ".new"); int e = cf.Error();