gtg092x / gulp-sftp

Gulp SFTP Deploy
140 stars 61 forks source link

Directories are not created when uploading from Windows to Linux #16

Closed davismj closed 9 years ago

davismj commented 10 years ago

My configuration, for example

gulp.task('ftp', function () { return gulp.src(allFiles, { base: './' }) .pipe(sftp({ host: 'example.com',
port: '22', user: 'user', pass: 'password', remotePath: '/remote/'
})); });

Throws the following:

[17:50:43] SFTP error or directory exists: Error: No such file /remote/sub/folder

events.js:72 throw er; // Unhandled 'error' event ^ Error: No such file at SFTP._parse (D:\path\to\node_modules\gulp-sftp\node_modules\ssh2\lib\SFTP\SFTPv3.js:1090:23) at ChannelStream. (D:\path\to\node_modules\gulp-sftp\node_modules\ssh2\lib\SFTP\SFTPv3.js:72:10) at ChannelStream.EventEmitter.emit (events.js:95:17) at ChannelStream. (_streamreadable.js:745:14) at ChannelStream.EventEmitter.emit (events.js:92:17) at emitReadable (_stream_readable.js:407:10) at emitReadable (_stream_readable.js:403:5) at readableAddChunk (_stream_readable.js:165:9) at ChannelStream.Readable.push (_stream_readable.js:127:10) at Parser. (D:\path\to\node_modules\gulp-sftp\node_modules\ssh2\lib\Channel.js:102:25)

gtg092x commented 9 years ago

@davismj Found your issue! The parents system argument caused issues. Can you download the new branch and see if your issue is addressed? I'll bump the version and publish the changes if you can confirm this fixes it.

davismj commented 9 years ago

perfect, great work