Skip to content

.rename 501 Bad sequence of commands fix #317

@frylo0

Description

@frylo0

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions