atinux / node-ftps

FTP, FTPS and SFTP client for node.js, mainly a lftp wrapper.
MIT License
202 stars 57 forks source link

get and getFile command exited normaly, but file didn't appear in local machine #12

Closed Mukolajko closed 9 years ago

Mukolajko commented 9 years ago

Hi. i user your module for some time and everything was OK. But now when I try to use this work all files that in this directory module returns var ls = ftps.cd(config.folder).raw('ls'); below exited with no error but file werent save on local hard drive. ftps.get(from_file_path, to_file_path); ftps.exec(function (err, res) { if (err) { console.log(err); } else { console.log("OK"); } }); I'm using windows 7. Try run the same code on Mac. It works Ok, so I guess it's only windows issue. In processes lftp and ssh present. And exit after copy with no errors. So my guess is that it should be problem with paths. But I try many variants of to_file_path(using path.join, hardcoding) but still no luck. Maybe you guys can help me with that?

Mukolajko commented 9 years ago

Guys I figure out the problem. path.join make path look like this D:\work. But for get command we need this '/'. So the folowing path won't work 'work\data\filename', but this will 'work/data/filename' in windows. Of course if path exists. So for windows we need to use some checks in order to avoid this issue. But this problem not module its work perfect. Ty for your work. Module great!!

atinux commented 9 years ago

Good to know :) Don't forget to star the project if you like it! Thanks

On 05 Dec 2014, at 17:09, Mykola notifications@github.com wrote:

Closed #12.

— Reply to this email directly or view it on GitHub.