fix: download path not being saved correctly

This commit is contained in:
Jelle Glebbeek
2021-07-03 21:00:54 +02:00
parent fe5d0ed895
commit 912701586c
2 changed files with 5 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ class Filepaths {
await fs.promises.access(setPath);
this.env.settings.downloadPath = setPath;
} catch (e) {
console.log("The configured download path could not be found, switching to downloads folder.");
console.warn("The configured download path could not be found, switching to downloads folder.");
this.setDefaultDownloadPath();
}
}
@@ -76,10 +76,9 @@ class Filepaths {
try {
this.env.settings.downloadPath = this.app.getPath('downloads');
} catch(e) {
console.warn("Using executable path as download location, as downloads was not found.");
this.env.settings.downloadPath = this.app.getPath('exe');
console.warn("Using home path as download location, as downloads was not found.");
this.env.settings.downloadPath = this.app.getPath('home');
}
this.appPath = this.app.getAppPath();
}
detectPlatform() {

View File

@@ -71,7 +71,6 @@ class Settings {
update(settings) {
this.outputFormat = settings.outputFormat;
this.audioOutputFormat = settings.audioOutputFormat;
this.downloadPath = settings.downloadPath;
this.proxy = settings.proxy;
this.autoFillClipboard = settings.autoFillClipboard;
this.spoofUserAgent = settings.spoofUserAgent;
@@ -88,7 +87,8 @@ class Settings {
if(this.maxConcurrent !== settings.maxConcurrent) {
this.maxConcurrent = settings.maxConcurrent;
this.env.changeMaxConcurrent(settings.maxConcurrent);
}this.updateBinary = settings.updateBinary;
}
this.updateBinary = settings.updateBinary;
this.updateApplication = settings.updateApplication;
this.theme = settings.theme;
this.save();