mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Interface freeze when call directory hotlist with inaccessible network drive (issue #1441)
(cherry picked from commit c439aac266)
This commit is contained in:
parent
c7bc5e6392
commit
c61ad5d17c
1 changed files with 11 additions and 3 deletions
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Several useful functions
|
||||
|
||||
Copyright (C) 2006-2020 Alexander Koblov (alexx2000@mail.ru)
|
||||
Copyright (C) 2006-2024 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
contributors:
|
||||
|
||||
|
|
@ -368,12 +368,20 @@ begin
|
|||
|
||||
if Pos(PathDelim, Result) > PATH_DELIM_POS then
|
||||
begin
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
if (Length(Result) > 1) and (Result[1] in ['A'..'Z', 'a'..'z']) and
|
||||
(Result[2] = DriveSeparator) and (GetDriveType(PAnsiChar(ExtractFileDrive(Result) + PathDelim)) = DRIVE_REMOTE) then
|
||||
begin
|
||||
Result:= ExpandAbsolutePath(Result)
|
||||
end
|
||||
else
|
||||
{$ENDIF}
|
||||
Result:= ExpandFileName(Result);
|
||||
end;
|
||||
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
// Remove double backslash '\\' after calling 'ExpandFileName'
|
||||
if (Pos(':\\', Result) = 2) and (Result[1] in ['A'..'z']) then
|
||||
// Remove double backslash '\\' after calling 'ExpandFileName'
|
||||
if (Pos(':\\', Result) = 2) and (Result[1] in ['A'..'Z', 'a'..'z']) then
|
||||
Result:= Result.Remove(2, 1);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue