This commit is contained in:
Andrew Pamment 2018-06-01 11:11:29 +10:00
parent d8f7f66b5e
commit abcad46414

View File

@ -861,7 +861,13 @@ void handle_PWD(struct ftpserver *cfg, struct ftpclient *client) {
exit(-1); exit(-1);
} }
sprintf(buffer, "257 \"%s\"\r\n", client->current_path); if (client->current_path == client->user->indir) {
sprintf(buffer, "257 \"/in\"\r\n");
} else if (client->current_path == client->user->outdir) {
sprintf(buffer, "257 \"/out\"\r\n");
} else {
sprintf(buffer, "257 \"/\"\r\n");
}
send_msg(client, buffer); send_msg(client, buffer);
free(buffer); free(buffer);
} }