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

FormatException #12

Closed
b3lon9 opened this issue May 13, 2024 · 1 comment · Fixed by #13
Closed

FormatException #12

b3lon9 opened this issue May 13, 2024 · 1 comment · Fixed by #13

Comments

@b3lon9
Copy link

b3lon9 commented May 13, 2024

hi crifurch, I used your package.
find one bug.

I want process to upload local file into FTP Server(Ubuntu).
but EPSV state do not work.

so I look your source and find bug.

file path : data_parser_utils.dart, line:28
_parseProtEPSV

message not applied change substring message.

  static int _parsePortEPSV(FtpResponse response) {
    final message = response.message;
    final iParOpen = message.indexOf('(');
    final iParClose = message.indexOf(')');

    if (iParClose > -1 && iParOpen > -1) {
      message.substring(iParOpen + 4, iParClose - 1);
    }
    return int.parse(message);
  }

change

  static int _parsePortEPSV(FtpResponse response) {
    String message = response.message;
    final iParOpen = message.indexOf('(');
    final iParClose = message.indexOf(')');

    if (iParClose > -1 && iParOpen > -1) {
      message = message.substring(iParOpen + 4, iParClose - 1);
    }
    return int.parse(message);
  }
@crifurch
Copy link
Owner

@b3lon9 thanks for your work, i will fix it in few hours

crifurch added a commit that referenced this issue May 13, 2024
@crifurch crifurch mentioned this issue May 13, 2024
Merged
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 a pull request may close this issue.

2 participants