ssh-client-wrapper 2.10.1 → 2.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/rsyncExec.js +3 -4
  2. package/package.json +1 -1
package/lib/rsyncExec.js CHANGED
@@ -118,10 +118,9 @@ async function recv (hostInfo, argSrc, dst, rsyncOpt, timeout) {
118
118
  args.unshift("--old-args");
119
119
  }
120
120
 
121
- // make destination directory if multi files will be transferd
122
- if (argSrc.len > 1 || hasMagic(argSrc[0])) {
123
- await fs.mkdir(dst, { recursive: true });
124
- }
121
+ // make destination directory
122
+ const dstDir = argSrc.len > 1 || hasMagic(argSrc[0]) ? dst : path.dirname(dst);
123
+ await fs.mkdir(dstDir, { recursive: true });
125
124
 
126
125
  debug(`recv ${src} to ${dst}`);
127
126
  debugVerbose(`recv: ${rsyncCmd} ${args.join(" ")}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ssh-client-wrapper",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "wrapper library for open ssh client and rsync",
5
5
  "keywords": [
6
6
  "ssh",