Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conn.clean deletes all the files without checking if a local file exists #134

Open
kolesnikov-sa opened this issue Nov 8, 2021 · 0 comments

Comments

@kolesnikov-sa
Copy link

kolesnikov-sa commented Nov 8, 2021

I'm on Gulp 4 with vinyl-ftp, and I'm not sure why the code below does not work as expected — it just deletes all the files from /www/remote/ and it's subfolders as opposed to checking with local if the files are available and delete selectively:

function clean() {
    let conn = ftp.create({
        host: 'xxx',
        user: 'yyy',
        password: 'zzz',
        parallel: 10,
        log: log
    });

    let remoteFiles = '/www/remote/**/*.*';

    return conn.clean(remoteFiles, './build', {base: '/'});
}

The local files are located in ./build relatively to gulpfile.js. The remote files are located in /www/remote.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant