Remove redundant state change in PWD

This commit is contained in:
Michael Theall 2020-11-18 13:27:52 +01:00
parent bc3c096b39
commit 78b257612a

View File

@ -2340,16 +2340,10 @@ void FtpSession::PORT (char const *args_)
void FtpSession::PWD (char const *args_) void FtpSession::PWD (char const *args_)
{ {
// handle keep-alive if (!authorized ())
if (m_state == State::COMMAND)
{ {
setState (State::COMMAND, false, false); sendResponse ("530 Not logged in\r\n");
return;
if (!authorized ())
{
sendResponse ("530 Not logged in\r\n");
return;
}
} }
auto const path = encodePath (m_cwd); auto const path = encodePath (m_cwd);