Skip to content

Commit ce9f87c

Browse files
committedFeb 20, 2024
runfix: issue with disabling downloadpath
1 parent 341c320 commit ce9f87c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎electron/src/main.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,10 @@ const bindIpcEvents = (): void => {
212212
ipcMain.handle(EVENT_TYPE.ACTION.GET_OG_DATA, (_event, url) => getOpenGraphDataAsync(url));
213213

214214
ipcMain.on(EVENT_TYPE.ACTION.CHANGE_DOWNLOAD_LOCATION, (_event, downloadPath?: string) => {
215-
if (downloadPath && EnvironmentUtil.platform.IS_WINDOWS) {
216-
fs.ensureDirSync(appHomePath(downloadPath));
215+
if (EnvironmentUtil.platform.IS_WINDOWS) {
216+
if (downloadPath) {
217+
fs.ensureDirSync(appHomePath(downloadPath));
218+
}
217219
//save the downloadPath locally
218220
settings.save(SettingsType.DOWNLOAD_PATH, downloadPath);
219221
settings.persistToFile();

0 commit comments

Comments
 (0)
Please sign in to comment.