A CLI tool for downloading from pixiv.net
Revisão | 4d786f7f460ffcd330989e17e236e4415a3a7283 (tree) |
---|---|
Hora | 2023-07-16 17:12:06 |
Autor | mio <stigma@disr...> |
Commiter | mio |
Fix falling back to user picture directory
@@ -996,6 +996,8 @@ loadConfig() | ||
996 | 996 | ProjectDirectories dirs = getProjectDirectories(null, "YumeNeru Software", |
997 | 997 | "pixiv_down"); |
998 | 998 | UserDirectories userDirs = getUserDirectories(); |
999 | + log.infof("dirs.configDir = %s", dirs.configDir); | |
1000 | + log.infof("userDirs.pictureDir = %s", userDirs.pictureDir); | |
999 | 1001 | |
1000 | 1002 | if (exists(dirs.configDir)) { |
1001 | 1003 | string configFilePath = buildPath(dirs.configDir, "settings.conf"); |
@@ -1004,11 +1006,14 @@ loadConfig() | ||
1004 | 1006 | parser.read(configFilePath); |
1005 | 1007 | config.baseFolder = parser.get("output", "base_folder", |
1006 | 1008 | userDirs.pictureDir); |
1009 | + } else { | |
1010 | + config.baseFolder = userDirs.pictureDir; | |
1007 | 1011 | } |
1008 | 1012 | } else { |
1009 | 1013 | // Set default values |
1010 | 1014 | config.baseFolder = userDirs.pictureDir; |
1011 | 1015 | } |
1016 | + log.infof("config.baseFolder = %s", config.baseFolder); | |
1012 | 1017 | |
1013 | 1018 | string idFilePath = buildPath(dirs.dataDir, ".phpsessid"); |
1014 | 1019 |