Closed csonlai closed 8 years ago
this bug only happen in windows file system,i think this will fix it:
getSftp(function (err, sftp) {
if (err) return end(err, callback)
file.base = file.base.replace(/\\/g,'/'); //add to fix bug in windows
var baseRegexp = new RegExp('^' + file.base.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'))
var outPath = path.join(destDir, file.path.replace(baseRegexp, '')).replace(/\\/g, '/')
..........
You can try to add a filter stream between src and dest
gulp.src(htmlPath).pipe(filterStream).pipe(sshStream)
can filter stream change the file.base?
as result,it transfer all folders to remote, not just the html files, for example: [17:33:40] Finished writing '/xx/x/remote_dir/d:/project/src/xx.html
how could i only transfer the html files to remote? thx