Made folder creation recursive
This commit is contained in:
parent
ec9f619f38
commit
1d6276b112
1
.gitignore
vendored
1
.gitignore
vendored
@ -14,3 +14,4 @@ hentai_downloader-test-*
|
|||||||
*.obj
|
*.obj
|
||||||
*.lst
|
*.lst
|
||||||
list.txt
|
list.txt
|
||||||
|
*.log
|
||||||
|
@ -33,7 +33,7 @@ class DownloaderConfig
|
|||||||
static private:
|
static private:
|
||||||
import std.stdio : writeln;
|
import std.stdio : writeln;
|
||||||
import std.json : JSONValue, parseJSON;
|
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.stdio : toFile;
|
||||||
import std.string: strip;
|
import std.string: strip;
|
||||||
import std.array : replace;
|
import std.array : replace;
|
||||||
@ -83,7 +83,7 @@ static private:
|
|||||||
|
|
||||||
// if the folder ~/.config/hentai_downloader doesnt exist
|
// if the folder ~/.config/hentai_downloader doesnt exist
|
||||||
if(!exists(config_dir))
|
if(!exists(config_dir))
|
||||||
mkdir(config_dir); // Create it
|
mkdirRecurse(config_dir); // Create it
|
||||||
|
|
||||||
/* writeln("Config file: ", config_path); */
|
/* writeln("Config file: ", config_path); */
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ static private:
|
|||||||
if(!exists(absolutePath))
|
if(!exists(absolutePath))
|
||||||
{
|
{
|
||||||
// If the `standard_download_folder` doesnt exist, create it!
|
// If the `standard_download_folder` doesnt exist, create it!
|
||||||
absolutePath.mkdir();
|
absolutePath.mkdirRecurse();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user