Core/Directory: Fix recursive Create method on Posix
This commit is contained in:
@@ -395,7 +395,7 @@ namespace Nz
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
#ifdef NAZARA_PLATFORM_WINDOWS
|
#ifdef NAZARA_PLATFORM_WINDOWS
|
||||||
// Unlike to disk (Ex: "C:"), the netwrok path is not considered as a directory (Ex: "\\Laptop")
|
// Unlike to disk (Ex: "C:"), the network path is not considered as a directory (Ex: "\\Laptop")
|
||||||
if (path.Match("\\\\*"))
|
if (path.Match("\\\\*"))
|
||||||
{
|
{
|
||||||
foundPos = path.Find('\\', 2);
|
foundPos = path.Find('\\', 2);
|
||||||
@@ -414,11 +414,14 @@ namespace Nz
|
|||||||
if (p.EndsWith(NAZARA_DIRECTORY_SEPARATOR))
|
if (p.EndsWith(NAZARA_DIRECTORY_SEPARATOR))
|
||||||
p = p.SubString(0, -2);
|
p = p.SubString(0, -2);
|
||||||
|
|
||||||
|
if (!p.IsEmpty())
|
||||||
|
{
|
||||||
if (!DirectoryImpl::Exists(p) && !DirectoryImpl::Create(p))
|
if (!DirectoryImpl::Exists(p) && !DirectoryImpl::Create(p))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (foundPos == String::npos)
|
if (foundPos == String::npos)
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
foundPos = path.Find(NAZARA_DIRECTORY_SEPARATOR, foundPos + 1);
|
foundPos = path.Find(NAZARA_DIRECTORY_SEPARATOR, foundPos + 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user