This repository was archived by the owner on Feb 5, 2022. It is now read-only.
This repository was archived by the owner on Feb 5, 2022. It is now read-only.
"glob *" writes to wrong destination folder #27
Open
Description
Source
OS: Windows 7
Pattern: C:\Users\aaa\bbb\ccc*
Destination
OS: Linux
Folder: /home/target/out/
Expected Result
Everything in source folder C:\Users\aaa\bbb\ccc should be copied into destination directory /home/target/out/ (which already exists when scp is called)
Actual Result
Only the first file from the source folder is copied to the correct destination folder. All other files are copied to the PARENT folder of the destination folder instead, i.e. to /home/target/ instead of /home/target/out/
Sample Code
function run(srcFolder, dstConfig, cb) {
var src = path.join(srcFolder, "*");
// the following shows C:\Users\aaa\bbb\ccc\*
console.log("source pattern: " + src);
// the following shows /home/target/out/
console.log("destination folder: " + dstConfig.path);
scp(src, dstConfig, function(err) {
cb(err);
});
}
Metadata
Metadata
Assignees
Labels
No labels