Skip to content

Commit 48e420b

Browse files
authored
Fixed a bug in FTP command MLST
Notably, the bug prevented the FTP client WinSCP from moving/renaming files.
1 parent fb07066 commit 48e420b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

source/ftp.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,10 @@ static void cmd_MLST(struct client_info *client)
844844
{
845845
char path[PATH_MAX];
846846
if (gen_ftp_path(path, sizeof(path), client, client->cmd_args)
847-
|| !ftp_file_exists(path))
847+
|| !ftp_file_exists(path)) {
848848
send_ctrl_msg(client, RC_550);
849+
return;
850+
}
849851

850852
sendf_ctrl_msg(client, "250-Listing %s" CRLF,
851853
client->cmd_args ? client->cmd_args : client->cur_path);

source/ftp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define FILE_BUF_SIZE 8192
1212
#define DEFAULT_PATH "/"
1313
#define DEFAULT_PORT 1337
14-
#define RELEASE_VERSION "v1.08"
14+
#define RELEASE_VERSION "v1.08a"
1515

1616
// Default FTP reply codes -----------------------------------------------------
1717
// Commented reply codes mean their string needs to be generated dynamically.

0 commit comments

Comments
 (0)