projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
45f78bd
)
Fix CreateAllDirs() (failed for relative fully non-existing path)
author
Perttu Ahola
<celeron55@gmail.com>
Sun, 11 Mar 2012 14:06:32 +0000
(16:06 +0200)
committer
Perttu Ahola
<celeron55@gmail.com>
Sun, 11 Mar 2012 14:06:32 +0000
(16:06 +0200)
src/filesys.cpp
patch
|
blob
|
history
diff --git
a/src/filesys.cpp
b/src/filesys.cpp
index a65515d0351dc12f1a6e7236254922a652743cdb..1070b31e593a4f70755cb66c3de3ad21a0936a00 100644
(file)
--- a/
src/filesys.cpp
+++ b/
src/filesys.cpp
@@
-327,11
+327,12
@@
bool CreateAllDirs(std::string path)
tocreate.push_back(basepath);
pos = basepath.rfind(DIR_DELIM_C);
if(pos == std::string::npos)
-
return false
;
+
break
;
basepath = basepath.substr(0,pos);
}
for(int i=tocreate.size()-1;i>=0;i--)
- CreateDir(tocreate[i]);
+ if(!CreateDir(tocreate[i]))
+ return false;
return true;
}