From 1b670a293b2747eccd743b09fda20fbdfc1c1ad7 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sun, 11 Mar 2012 16:06:32 +0200 Subject: [PATCH] Fix CreateAllDirs() (failed for relative fully non-existing path) --- src/filesys.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/filesys.cpp b/src/filesys.cpp index a65515d03..1070b31e5 100644 --- 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; } -- 2.25.1