Skip to content
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

REST send before RETR if restart is used. fixes #76 #77

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

holymoly
Copy link

this commit fixes #76

@holymoly
Copy link
Author

Don't know why this happend. thought that naming the issue should be enough...

@holymoly
Copy link
Author

holymoly commented Feb 3, 2014

This ones fixes the issue with the restart command. Would be good if someone check the code.

@@ -779,7 +801,9 @@ FTP.prototype.lastMod = function(path, cb) {
};

FTP.prototype.restart = function(offset, cb) {
this._send('REST ' + offset, cb);
self = this;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line can be removed

@mscdex
Copy link
Owner

mscdex commented May 21, 2014

Aside from the inline comments, there are a couple of other issues:

  • The err argument passed to the callback in _send() should be checked (in case REST is not supported on the server) and appropriate action should be taken if err is indeed set.
  • Code style should match the rest of the source code (mainly spacing here)

@holymoly
Copy link
Author

I hope to find some time to change the other things (check Rest support of Server, err Handling and Code Style) on the Weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REST command is send before PASV instead of RETR
2 participants