Skip to content

Commit

Permalink
runfix: issue with disabling downloadpath
Browse files Browse the repository at this point in the history
  • Loading branch information
tlebon committed Feb 20, 2024
1 parent 341c320 commit ce9f87c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions electron/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,10 @@ const bindIpcEvents = (): void => {
ipcMain.handle(EVENT_TYPE.ACTION.GET_OG_DATA, (_event, url) => getOpenGraphDataAsync(url));

ipcMain.on(EVENT_TYPE.ACTION.CHANGE_DOWNLOAD_LOCATION, (_event, downloadPath?: string) => {
if (downloadPath && EnvironmentUtil.platform.IS_WINDOWS) {
fs.ensureDirSync(appHomePath(downloadPath));
if (EnvironmentUtil.platform.IS_WINDOWS) {
if (downloadPath) {
fs.ensureDirSync(appHomePath(downloadPath));
}
//save the downloadPath locally
settings.save(SettingsType.DOWNLOAD_PATH, downloadPath);
settings.persistToFile();
Expand Down

0 comments on commit ce9f87c

Please sign in to comment.