server: correctly pass destinationPath to moveTorrents

Bug: #42
This commit is contained in:
Jesse Chan
2020-09-28 10:17:02 +08:00
parent ad51336956
commit d19f1485d6
2 changed files with 2 additions and 2 deletions

View File

@@ -249,7 +249,7 @@ class ClientRequest {
let callback = () => { let callback = () => {
// empty initializer // empty initializer
}; };
const destination = `${destinationPath}${path.sep}${filenames[index]}`; const destination = path.join(destinationPath, filenames[index]);
const isLastRequest = index + 1 === sourcePaths.length; const isLastRequest = index + 1 === sourcePaths.length;
if (isLastRequest) { if (isLastRequest) {

View File

@@ -285,7 +285,7 @@ const client = {
moveTorrentsRequest.moveTorrents({ moveTorrentsRequest.moveTorrents({
filenames, filenames,
sourcePaths, sourcePaths,
resolvedPath, destinationPath: resolvedPath,
}); });
}; };