mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-30 07:35:59 +00:00
Fixed: Create Ryzom profile folder if not already created and return 1 if unable to create it
--HG-- branch : develop
This commit is contained in:
parent
13ab34d174
commit
9a7bcd8613
1 changed files with 10 additions and 5 deletions
|
@ -203,13 +203,18 @@ int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
std::string currentPath = CPath::getApplicationDirectory("Ryzom");
|
std::string currentPath = CPath::getApplicationDirectory("Ryzom");
|
||||||
|
|
||||||
// append profile ID to directory
|
// create parent directory
|
||||||
if (Args.haveArg("p"))
|
|
||||||
currentPath = NLMISC::CPath::standardizePath(currentPath) + Args.getArg("p").front();
|
|
||||||
|
|
||||||
if (!CFile::isExists(currentPath)) CFile::createDirectory(currentPath);
|
if (!CFile::isExists(currentPath)) CFile::createDirectory(currentPath);
|
||||||
|
|
||||||
CPath::setCurrentPath(currentPath);
|
// append profile ID to directory
|
||||||
|
if (Args.haveArg("p"))
|
||||||
|
{
|
||||||
|
currentPath = NLMISC::CPath::standardizePath(currentPath) + Args.getArg("p").front();
|
||||||
|
|
||||||
|
if (!CFile::isExists(currentPath)) CFile::createDirectory(currentPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CPath::setCurrentPath(currentPath)) return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TEST_CRASH_COUNTER
|
#ifdef TEST_CRASH_COUNTER
|
||||||
|
|
Loading…
Reference in a new issue