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 = () => {
// empty initializer
};
const destination = `${destinationPath}${path.sep}${filenames[index]}`;
const destination = path.join(destinationPath, filenames[index]);
const isLastRequest = index + 1 === sourcePaths.length;
if (isLastRequest) {

View File

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