Fix return values

This commit is contained in:
Cory Balaton 2023-12-22 16:01:31 +01:00
parent 369c0ae21d
commit 8f3c27ac40
Signed by: coryab
GPG Key ID: F7562F0EC4E4A61B

View File

@ -45,14 +45,14 @@ bool mkpath(std::string path, int mode)
cur_dir = path.substr(0, pos); cur_dir = path.substr(0, pos);
if (mkdir(cur_dir.c_str(), mode) != 0 if (mkdir(cur_dir.c_str(), mode) != 0
&& stat(cur_dir.c_str(), &buf) != 0) { && stat(cur_dir.c_str(), &buf) != 0) {
return -1; return false;
} }
} }
else { else {
break; break;
} }
} }
return 0; return true;
} }
std::string dirname(const std::string &path) std::string dirname(const std::string &path)