From 8817d1400142e9b45cc970a6b5c34caf38b8f317 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 19 Jul 2017 17:06:46 +0800 Subject: [PATCH] Fix bug when using glob patten --- lib/scp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scp.js b/lib/scp.js index 85e2675..6803d00 100644 --- a/lib/scp.js +++ b/lib/scp.js @@ -9,7 +9,7 @@ function cp2remote(client, src, dest, callback) { client.parse(dest); var _upload = function(files, callback) { - var rootdir = files[0]; + var rootdir = path.dirname(files[0]); async.eachSeries(files, function(fpath, done) { fs.stat(fpath, function(err, stats) {