1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Bug 1768: Allow other 2xx responses to PWD command, not only the standard 257

https://winscp.net/tracker/1768
(cherry picked from commit 3a54bf3369)

Source commit: 47f75e56e5bd30b2c358bb6d305c0e9dfe211296
This commit is contained in:
Martin Prikryl
2021-10-22 08:01:16 +00:00
parent 37efe27dcb
commit 445ac69841
3 changed files with 14 additions and 2 deletions

View File

@@ -1960,8 +1960,8 @@ void __fastcall TFTPFileSystem::ReadCurrentDirectory()
DebugAssert(Response != NULL);
bool Result = false;
// the only allowed 2XX code to "PWD"
if ((Code == 257) &&
// The 257 is the only allowed 2XX code to "PWD"
if (((Code == 257) || FTerminal->SessionData->FtpAnyCodeForPwd) &&
(Response->Count == 1))
{
UnicodeString Path = Response->Text;