diff --git a/libs/os/dir.h b/libs/os/dir.h index 1358ac5cbe..add632fa16 100644 --- a/libs/os/dir.h +++ b/libs/os/dir.h @@ -55,8 +55,8 @@ inline bool makeDirectory(const std::string& name) { fs::path dirPath(name); - // Create the directory - if (fs::create_directory(dirPath)) + // Create the directory, including nonexistent parents + if (fs::create_directories(dirPath)) { // Directory has been created, set permissions rMessage() << "Directory " << dirPath << " created successfully." << std::endl;