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

Bug 1659: Relative long paths are not handled correctly

https://winscp.net/tracker/1659

Source commit: 20c5802e3fa677c83e78bc3cb37fa1b46a63bdf2
This commit is contained in:
Martin Prikryl
2018-07-04 16:16:55 +00:00
parent ed0b0ada90
commit 1f21f57f30

View File

@@ -1144,6 +1144,13 @@ UnicodeString __fastcall MakeUnicodeLargePath(UnicodeString Path)
//---------------------------------------------------------------------------
UnicodeString __fastcall ApiPath(UnicodeString Path)
{
UnicodeString Drive = ExtractFileDrive(Path);
// This may match even a path like "C:" or "\\server\\share", but we do not really care
if (Drive.IsEmpty() || (Path.SubString(Drive.Length() + 1, 1) != L"\\"))
{
Path = ExpandFileName(Path);
}
if (Path.Length() >= MAX_PATH)
{
if (Configuration != NULL)