fix(remote): 修复远程下载文件路径问题
This commit is contained in:
@@ -262,7 +262,8 @@ ipcMain.handle('remote-download-file', async (_event, serverHost: string, port:
|
|||||||
throw new Error('No window found');
|
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) {
|
if (password) {
|
||||||
url += `?password=${encodeURIComponent(password)}`;
|
url += `?password=${encodeURIComponent(password)}`;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user