Made folder creation recursive

This commit is contained in:
Beepboop Belong the 3rd 2020-04-15 12:20:29 +02:00
parent ec9f619f38
commit 1d6276b112
Signed by: beepboopbelong
GPG Key ID: B873A12869A7BD29
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@ hentai_downloader-test-*
*.obj
*.lst
list.txt
*.log

View File

@ -33,7 +33,7 @@ class DownloaderConfig
static private:
import std.stdio : writeln;
import std.json : JSONValue, parseJSON;
import std.file : exists, mkdir, readText, copy;
import std.file : exists, readText, copy, mkdirRecurse;
import std.stdio : toFile;
import std.string: strip;
import std.array : replace;
@ -83,7 +83,7 @@ static private:
// if the folder ~/.config/hentai_downloader doesnt exist
if(!exists(config_dir))
mkdir(config_dir); // Create it
mkdirRecurse(config_dir); // Create it
/* writeln("Config file: ", config_path); */
@ -117,7 +117,7 @@ static private:
if(!exists(absolutePath))
{
// If the `standard_download_folder` doesnt exist, create it!
absolutePath.mkdir();
absolutePath.mkdirRecurse();
}
}