Using gulp-sftp to upload only changed files

I have the following task in gulp:

gulp.task('sync-frontend', /*['build-frontend'],*/ function()
{

    if(config.layout.frontend.syncOnBuild)
        return gulp
            .src(config.layout.frontend.distDir + '/**')
            .pipe(changed(config.layout.frontend.distDir, {hasChanged: changed.compareSha1Digest}))
            //.pipe(debug())
            .pipe(gulp.dest(config.layout.frontend.distDir))
            .pipe(sftp
            ({

                host: config.sftp.host,
                port: config.sftp.port,
                user: config.sftp.user,
                pass: config.sftp.pass,
                remotePath: (config.layout.frontend.remotePath ? config.layout.frontend.remotePath : config.sftp.remotePath )

            }));

});

The config.layout.frontend.distDir value is 'httpdocs'.

The problem is that no files are being uploaded, no matter if they are changed or not (I already tried to leave hasChange option of gulp-changed in the default. I always get the following output:

[20:45:52] Using gulpfile /Storage/Portable/Sync/Projects/Prataria/web-prataria/gulpfile.js
[20:45:52] Starting 'sync-frontend'...
[20:45:52] gulp-sftp: No files uploaded
[20:45:52] Finished 'sync-frontend' after 503 ms

Any ideas?

I ran into this and found the formatting on the gulp.src needed to be prefixed with the ./ to find the correct folder. So try ./httpdocs as your value for config.layout.frontend.distDir.