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:
John Peterson 2008-12-01 12:18:50 +00:00
parent 0e6f7853c9
commit 159d33a251
1 changed files with 6 additions and 4 deletions

View File

@ -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)
{