fix(remote): 修复远程下载文件路径问题

This commit is contained in:
2026-03-10 01:50:11 +08:00
parent 84e455d9a6
commit 073abafdfd

View File

@@ -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)}`;
}