Skip to content

Ftp.get(remotePath, localPath, callback) creating files with size 0 #315

@nuryagdym

Description

@nuryagdym

get function creating files with size 0 and nothing else happens.
code:

let ftp = new JsFtp({
    host: settings.host,
    port: settings.port,
    user: settings.user,
    pass: settings.pass,
    debug: console.log,
    debugMode: true,
});

ftp.get('/popup_flag.txt', './popup_flag.txt', function (err) {
    if (err) {
        console.error('ftp.get failed.', err);
        return;
    }
    console.log('-', 'downloaded', 'downloaded successfully');
});

I could not get any logs of by running this code, ./popup_flag.txt file is created but it is empty.

NodeJS: v12.16.3
OS: Windows 10

this my might be related to #284 and #285

tried using another library basic-ftp which worked. I guess it is NodeJS version issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions