FileUtil: Fixed CreateDirectoryStructure(), I don't think you can use double quotes "" in find, it must be ''
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1368 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
0e6f7853c9
commit
159d33a251
|
@ -166,9 +166,11 @@ bool CreateDirectoryStructure(const std::string& _rFullPath)
|
|||
size_t Position = 0;
|
||||
while(true)
|
||||
{
|
||||
// find next sub path
|
||||
// Find next sub path, support both \ and / directory separators
|
||||
{
|
||||
size_t nextPosition = _rFullPath.find(DIR_SEP, Position);
|
||||
size_t nextPosition = _rFullPath.find('/', Position);
|
||||
if (nextPosition == std::string::npos)
|
||||
nextPosition = _rFullPath.find('\\', Position);
|
||||
Position = nextPosition;
|
||||
|
||||
if (Position == std::string::npos)
|
||||
|
@ -177,7 +179,7 @@ bool CreateDirectoryStructure(const std::string& _rFullPath)
|
|||
Position++;
|
||||
}
|
||||
|
||||
// create next sub path
|
||||
// Create next sub path
|
||||
std::string SubPath = _rFullPath.substr(0, Position);
|
||||
if (!SubPath.empty())
|
||||
{
|
||||
|
@ -188,7 +190,7 @@ bool CreateDirectoryStructure(const std::string& _rFullPath)
|
|||
}
|
||||
}
|
||||
|
||||
// just a safty check...
|
||||
// A safety check
|
||||
PanicCounter--;
|
||||
if (PanicCounter <= 0)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue