Skip to content

Commit

Permalink
Handle permission denied
Browse files Browse the repository at this point in the history
  • Loading branch information
uhlin committed Jan 19, 2025
1 parent 14317f6 commit 7f0839d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commands/ftp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,12 @@ ftp_data_conn::send_file(void)
size_t bytes_read = 0;

while (ftp::ctl_conn->read_reply(1)) {
for (const FTP_REPLY &rep : ftp::ctl_conn->reply_vec)
for (const FTP_REPLY &rep : ftp::ctl_conn->reply_vec) {
if (rep.num == 550 ||
rep.num == 553) // Permission denied
proceed = false;
print_one_rep(rep.num, rep.text.c_str());
}
}

if (!proceed)
Expand Down

0 comments on commit 7f0839d

Please sign in to comment.