-
Notifications
You must be signed in to change notification settings - Fork 155
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
Fixed accents filename parsing on parseFtpEntries, but you may can also patch jsftp, up to you #121
Comments
Hi there, can you make a Pull Request and add some tests? Thanks! |
Hi, it("navigation through a directory containing special characters", function(next) {
var dirName = "_éàèùâêûô_"; // and it works with "_aaa_";
var newDir = remoteCWD + "/" + dirName;
ftp.raw.mkd(newDir, function(err, res) {
assert.ok(!err);
assert.equal(res.code, 257);
ftp.ls(remoteCWD, function(err, res) {
assert.ok(!err);
assert.ok(res.some(function(el){return el.name.indexOf(dirName)>-1;}));
ftp.raw.rmd(newDir, function(err, res) {
assert.ok(!err);
next();
});
});
});
}); code available on : My solution is already proposed on top of this issue. Note : I have also found minor changes because of unrecognised STAT command and stability issues on FileZilla server. Just added features check before sending STAT command. |
Hi @sergi OK. I'll take a look. |
Hi @sergi test/jsftp_test.js -> added check for server.stop, server is undefined when I launch the tests To test : Note : test included, check at the end of jsftp_test.js Hope it helps. |
Hi @jmzoda, I cloned your branch and ran your tests. It fails on 0.12 and in iojs:
How are you running the tests? It clearly fails for me. Perhaps it would be good to run them in Travis. |
�[0m�[0m �[32m √�[0m�[90m test initialize bad host �[0m�[31m(2607ms)�[0m �[32m √�[0m�[90m test initialize �[0m �[32m √�[0m�[90m test parseResponse with mark �[0m �[32m √�[0m�[90m test parseResponse with no mark �[0m �[32m √�[0m�[90m test send function �[0m �[32m √�[0m�[90m test parseResponse with ignore code �[0m �[32m √�[0m�[90m test invalid username �[0m �[32m √�[0m�[90m test invalid password �[0m �[32m √�[0m�[90m test getFeatures �[0m �[32m √�[0m�[90m test print working directory �[0m �[31m 1) test switch CWD�[0m �[32m √�[0m�[90m test switch to unexistent CWD �[0m �[31m 2) test passive listing of current directory�[0m �[32m √�[0m�[90m test passive listing of nonexisting directory �[0m �[31m 3) test ftp node stat�[0m �[32m √�[0m�[90m test create and delete a directory �[0m �[32m √�[0m�[90m test create and delete a directory containing a space �[0m �[32m √�[0m�[90m test create and delete a file �[0m�[31m(137ms)�[0m �[32m √�[0m�[90m test save a remote copy of a local file �[0m�[31m(248ms)�[0m �[32m √�[0m�[90m test streaming put �[0m�[31m(207ms)�[0m �[32m √�[0m�[90m test rename a file �[0m�[31m(227ms)�[0m �[31m 4) test get a file�[0m �[31m 5) test get a file and save it locally�[0m �[31m 6) test get a big file stream�[0m �[32m √�[0m�[90m test put a big file stream �[0m�[31m(443ms)�[0m �[32m √�[0m�[90m test put a big file stream fail �[0m �[31m 7) test get fileList array�[0m �[32m √�[0m�[90m test reconnect �[0m �[32m √�[0m�[90m test attach event handlers: connect �[0m �[31m 8) test PASV streaming: Copy file using piping�[0m �[31m 9) Test that streaming GET (RETR) retrieves a file properly�[0m �[32m √�[0m�[90m Test that streaming GET (RETR) fails when a file is not present �[0m �[32m √�[0m�[90m Test that streaming PUT (STOR) stores a file properly �[0m �[32m √�[0m�[90m Test that streaming PUT (STOR) fails when a file is not present �[0m �[32m √�[0m�[90m Test that onConnect is called �[0m �[31m 10) Test for correct data on ls 1�[0m �[32m √�[0m�[90m Test raw method with PWD �[0m �[32m √�[0m�[90m Test raw method with HELP �[0m �[32m √�[0m�[90m Test keep-alive with NOOP �[0m�[31m(5010ms)�[0m �[32m √�[0m�[90m test set binary type �[0m �[32m √�[0m�[90m creating and listing a directory containing special characters �[0m �[92m �[0m�[32m 31 passing�[0m�[90m (13s)�[0m |
Thank you. I will check. |
It works. Thank you. See below for an extract of the npm test result : 37 passing (7s) |
Hello,
Should be fixed on parseFtpEntries but see below for jsftp.js patch. Works like a charm using utf8 : https://github.com/mathiasbynens/utf8.js
as usual install it with:
npm install utf8 --save
and put at the beginning jsftp.js file:
var utf8 = require('utf8');
Update
parser.js
with the utf8 decoding file names, really useful for names with accent and special characters.Thank you
The text was updated successfully, but these errors were encountered: