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

.rename 501 Bad sequence of commands fix #317

Open
frylo0 opened this issue Aug 23, 2022 · 0 comments
Open

.rename 501 Bad sequence of commands fix #317

frylo0 opened this issue Aug 23, 2022 · 0 comments

Comments

@frylo0
Copy link

frylo0 commented Aug 23, 2022

I've already found solution.

Ftp.prototype.rename = function(from, to, callback) {
  this.raw("rnfr", from, err => {
    if (err) {
      return callback(err);
    }
    this.raw("rnto", to, callback);
  });
};

Here, functions in lower case. Changing to upper case fixed problems.

Ftp.prototype.rename = function(from, to, callback) {
  this.raw("RNFR", from, err => {
    if (err) {
      return callback(err);
    }
    this.raw("RNTO", to, callback);
  });
};

Error before fix: 501 Bad sequence of commands
This solutiuons works for me.

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

No branches or pull requests

1 participant