Update ImageUtilities.plugin.js

This commit is contained in:
Mirco Wittrien 2020-08-15 09:39:54 +02:00
parent 594564cf4b
commit 4ab93ac35a
1 changed files with 2 additions and 1 deletions

View File

@ -688,7 +688,8 @@ var ImageUtilities = (_ => {
getDownloadLocation () {
if (BDFDB.LibraryRequires.fs.existsSync(inputs.downloadLocation)) return inputs.downloadLocation;
let downloadPath = BDFDB.LibraryRequires.process.env.USERPROFILE && BDFDB.LibraryRequires.path.join(BDFDB.LibraryRequires.process.env.USERPROFILE, "downloads");
let homePath = BDFDB.LibraryRequires.process.env.USERPROFILE || BDFDB.LibraryRequires.process.env.HOMEPATH || BDFDB.LibraryRequires.process.env.HOME;
let downloadPath = homePath && BDFDB.LibraryRequires.path.join(homePath, "Downloads");
if (downloadPath && BDFDB.LibraryRequires.fs.existsSync(downloadPath)) return downloadPath;
return BDFDB.BDUtils.getPluginsFolder();
}