Skip to content

Commit

Permalink
Create parent directories too in os::makeDirectory, to fix errors whe…
Browse files Browse the repository at this point in the history
…n trying to create the logfile with a non-existent .cache directory
  • Loading branch information
codereader committed Apr 22, 2021
1 parent 6cf3c9a commit 6a9160f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/os/dir.h
Expand Up @@ -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;
Expand Down

0 comments on commit 6a9160f

Please sign in to comment.