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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user