Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

pwd() should parse out just the path name

  • Loading branch information...
commit da3f3246f391205ff9bb948870d4e353f77aa3fd 1 parent 68bae50
@mscdex authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 ftp.js
View
6 ftp.js
@@ -412,7 +412,11 @@ FTP.prototype.append = function(input, path, cb) {
};
FTP.prototype.pwd = function(cb) { // PWD is optional
- this._send('PWD', cb);
+ this._send('PWD', function(err, text) {
+ if (err)
+ return cb(err);
+ cb(undefined, /^"(.+)"(?: |$)/.exec(text)[1]);
+ });
};
FTP.prototype.cdup = function(cb) { // CDUP is optional
Please sign in to comment.
Something went wrong with that request. Please try again.