diff --git a/electron/main.ts b/electron/main.ts index 27bd173..af19402 100644 --- a/electron/main.ts +++ b/electron/main.ts @@ -262,7 +262,8 @@ ipcMain.handle('remote-download-file', async (_event, serverHost: string, port: throw new Error('No window found'); } - let url = `http://${serverHost}:${port}/api/files/${encodeURIComponent(fileName)}`; + const fullPath = remotePath ? `${remotePath}\\${fileName}` : fileName; + let url = `http://${serverHost}:${port}/api/files/${encodeURIComponent(fullPath)}`; if (password) { url += `?password=${encodeURIComponent(password)}`; }