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

Bug 1999: Failure when SFTP server resolves "." path to an empty string

https://winscp.net/tracker/1999

Source commit: 94fd20cdddc1f74549c649bb84e4f20a900ca503
This commit is contained in:
Martin Prikryl
2021-06-29 13:23:37 +00:00
parent 5dabeda2f7
commit 5ab9308af0

View File

@@ -2924,6 +2924,11 @@ UnicodeString __fastcall TSFTPFileSystem::GetHomeDirectory()
if (FHomeDirectory.IsEmpty())
{
FHomeDirectory = RealPath(L".");
// Prevent infinite recursion when the server is broken
if (FHomeDirectory.IsEmpty())
{
FHomeDirectory = ROOTDIRECTORY;
}
}
return FHomeDirectory;
}