Permalink
Browse files

Merge pull request #36 from victorstanciu/fixes

  • Loading branch information...
2 parents 977863b + 0bbaacd commit 9092fb38cd527af36f86c9a7af2be941b15dcd4e @mscdex committed Dec 22, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 lib/ftp.js
View
7 lib/ftp.js
@@ -332,7 +332,7 @@ FTP.prototype.cwd = function(path, cb) {
};
FTP.prototype.delete = function(path, cb) {
- this._send('DELE' + path, cb);
+ this._send('DELE ' + path, cb);
};
FTP.prototype.status = function(cb) {
@@ -367,8 +367,7 @@ FTP.prototype.list = function(path, zcomp, cb) {
} else if (typeof zcomp === 'function') {
// list('/foo', function() {})
cb = zcomp;
- path = undefined;
- cmd = 'LIST';
+ cmd = 'LIST ' + path;
zcomp = false;
} else
cmd = 'LIST ' + path;
@@ -483,7 +482,7 @@ FTP.prototype.get = function(path, zcomp, cb) {
// the socket is closed (e.g. the server ran out of space).
var sockerr, started = false, lastreply = false, done = false,
source = sock;
-
+
if (zcomp) {
source = zlib.createInflate();
sock.pipe(source);

0 comments on commit 9092fb3

Please sign in to comment.