Skip to content

Commit

Permalink
Missing resource directory is automatically created (on windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
yvt committed Aug 25, 2013
1 parent ae3d10d commit 4fa0883
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Sources/Core/DirectoryFileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,13 @@ namespace spades {
std::string path = physicalPath(fn);

// create required directory
if(path.find('/') != std::string::npos){
size_t pos = path.find('/') + 1;
if(path.find_first_of("/\\") != std::string::npos){
size_t pos = path.find_first_of("/\\") + 1;
while(pos < path.size()){
size_t nextPos = pos;
while(nextPos < path.size() &&
path[nextPos] != '/')
path[nextPos] != '/' &&
path[nextPos] != '\\')
nextPos++;
if(nextPos == path.size())
break;
Expand Down

0 comments on commit 4fa0883

Please sign in to comment.