Skip to content
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
@rondonjon

Description

@rondonjon

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions