| @@ -11,6 +11,7 @@ | |||
| #include <sys/wait.h> | |||
| #include <stdexcept> | |||
| #include <system_error> | |||
| #include <unordered_set> | |||
| #include "logger.h" | |||
| #include "globals.h" | |||
| @@ -45,6 +46,11 @@ bool fileExists(const std::string &path) { | |||
| } | |||
| void mkdirp(const std::string &path) { | |||
| static thread_local std::unordered_set<std::string> set; | |||
| auto res = set.emplace(path); | |||
| if (!res.second) | |||
| return; | |||
| // TODO: Implement this in C++ instead | |||
| std::vector<std::string> argv; | |||
| argv.push_back("mkdir"); | |||