mirror of
https://github.com/wiiu-env/ftpiiu_plugin.git
synced 2024-11-23 05:09:18 +01:00
The test for additional switches to the LIST command
must be performed before the path is joined. Otherwise, the path will never be empty and the test will be skipped. Fixes ENODEV error (FTP/550) on clients using "LIST -a".
This commit is contained in:
parent
00191956b8
commit
57362f4b52
@ -1230,9 +1230,7 @@ void FtpSession::xferDir (char const *const args_, XferDirMode const mode_, bool
|
|||||||
if (std::strlen (args_) > 0)
|
if (std::strlen (args_) > 0)
|
||||||
{
|
{
|
||||||
// an argument was provided
|
// an argument was provided
|
||||||
auto const path = buildResolvedPath (m_cwd, args_);
|
|
||||||
if (path.empty ())
|
|
||||||
{
|
|
||||||
// work around broken clients that think LIST -a/-l is valid
|
// work around broken clients that think LIST -a/-l is valid
|
||||||
if (workaround_)
|
if (workaround_)
|
||||||
{
|
{
|
||||||
@ -1250,6 +1248,9 @@ void FtpSession::xferDir (char const *const args_, XferDirMode const mode_, bool
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto const path = buildResolvedPath (m_cwd, args_);
|
||||||
|
if (path.empty ())
|
||||||
|
{
|
||||||
sendResponse ("550 %s\r\n", std::strerror (errno));
|
sendResponse ("550 %s\r\n", std::strerror (errno));
|
||||||
setState (State::COMMAND, true, true);
|
setState (State::COMMAND, true, true);
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user