diff options
| author | John Peterson <jpeterson57@gmail.com> | 2008-12-01 12:18:50 +0000 |
|---|---|---|
| committer | John Peterson <jpeterson57@gmail.com> | 2008-12-01 12:18:50 +0000 |
| commit | 159d33a25146aade449eaef75f8291e2b6f051f2 (patch) | |
| tree | 3f09c4d8dc581dbbe6610d3d63183af4e5b02caf /Source/Core/Common | |
| parent | 0e6f7853c9fb8c689c21dfc0c417e6da41c9044e (diff) | |
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
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/FileUtil.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 625fe4a9ff..3bee9ce29f 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -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)
{
|
