Browse Source

Made folder creation recursive

master
parent
commit
1d6276b112
Signed by: beepboopbelong <beepboopbelong@firemail.cc> GPG Key ID: B873A12869A7BD29
2 changed files with 4 additions and 3 deletions
  1. +1
    -0
      .gitignore
  2. +3
    -3
      source/config/downloaderconfig.d

+ 1
- 0
.gitignore View File

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

+ 3
- 3
source/config/downloaderconfig.d 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();
}
}



Loading…
Cancel
Save