fix crash on invalid download paths (#1662)

Co-authored-by: = <=>
This commit is contained in:
Guillermo Vayá
2021-07-19 17:26:37 +02:00
committed by GitHub
parent e71c4ff9f0
commit ccd515e50c
2 changed files with 10 additions and 10 deletions

View File

@@ -282,7 +282,11 @@ function handleConfigSynchronize() {
WindowManager.setConfig(config.data);
setUnreadBadgeSetting(config.data.showUnreadBadge);
if (config.data.downloadLocation) {
app.setPath('downloads', config.data.downloadLocation);
try {
app.setPath('downloads', config.data.downloadLocation);
} catch (e) {
log.error(`There was a problem trying to set the default download path: ${e}`);
}
}
if (app.isReady()) {
WindowManager.sendToRenderer(RELOAD_CONFIGURATION);