mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: correct the matching of dtVirtual in FindMatchingDrive()
This commit is contained in:
parent
a8c875ec27
commit
b9573559b9
1 changed files with 9 additions and 1 deletions
|
|
@ -6593,6 +6593,14 @@ var
|
|||
DrivePath: String;
|
||||
DrivePathLen: PtrInt;
|
||||
LongestPathLen: Integer = 0;
|
||||
|
||||
function sameAddress( const drive: PDrive ): Boolean; inline;
|
||||
begin
|
||||
if (drive^.DriveType=dtVirtual) and (drive^.DeviceId=Address) then
|
||||
Exit( True );
|
||||
Result:= Address.IsEmpty;
|
||||
end;
|
||||
|
||||
begin
|
||||
Result := -1;
|
||||
|
||||
|
|
@ -6607,7 +6615,7 @@ begin
|
|||
if Pos(Address, DrivesList[I]^.Path) = 1 then
|
||||
Exit(I);
|
||||
end
|
||||
else if (DrivesList[I]^.DriveType <> dtSpecial) and Address.IsEmpty then
|
||||
else if sameAddress(DrivesList[I]) then
|
||||
begin
|
||||
DrivePath := UTF8UpperCase(DrivesList[I]^.Path);
|
||||
DrivePathLen := UTF8Length(DrivePath);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue