Update ImageUtilities.plugin.js
This commit is contained in:
parent
594564cf4b
commit
4ab93ac35a
|
@ -688,7 +688,8 @@ var ImageUtilities = (_ => {
|
||||||
|
|
||||||
getDownloadLocation () {
|
getDownloadLocation () {
|
||||||
if (BDFDB.LibraryRequires.fs.existsSync(inputs.downloadLocation)) return inputs.downloadLocation;
|
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;
|
if (downloadPath && BDFDB.LibraryRequires.fs.existsSync(downloadPath)) return downloadPath;
|
||||||
return BDFDB.BDUtils.getPluginsFolder();
|
return BDFDB.BDUtils.getPluginsFolder();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue