mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: improve support for root '/' in TDriveWatcher.GetDrivesList() on macOS
This commit is contained in:
parent
a02a84c5de
commit
417989d64b
2 changed files with 13 additions and 11 deletions
|
|
@ -1409,13 +1409,6 @@ begin
|
|||
IsMounted := true;
|
||||
AutoMount := true;
|
||||
end; { with }
|
||||
{$IF DEFINED(DARWIN)}
|
||||
if (fs.mountpoint = PathDelim) then
|
||||
begin
|
||||
Drive^.DisplayName:= GetVolumeName(fs.mntfromname);
|
||||
if Length(Drive^.DisplayName) = 0 then Drive^.DisplayName:= 'System';
|
||||
end;
|
||||
{$ENDIF}
|
||||
end; { for }
|
||||
{$IF DEFINED(DARWIN)}
|
||||
FreeAndNil( darwinVolumns );
|
||||
|
|
|
|||
|
|
@ -210,6 +210,10 @@ var
|
|||
groupUUID: NSString;
|
||||
dataDeviceID: NSString;
|
||||
begin
|
||||
Result:= fs^.mountpoint;
|
||||
if Result = PathDelim then
|
||||
Exit;
|
||||
|
||||
dataFs:= nil;
|
||||
groupUUID:= self.getGroupUUIDByDeviceID( StrToNSString(deviceID) );
|
||||
if groupUUID <> nil then begin
|
||||
|
|
@ -217,15 +221,20 @@ begin
|
|||
if dataDeviceID <> nil then
|
||||
dataFs:= self.getStatfsByDeviceID( dataDeviceID );
|
||||
end;
|
||||
if dataFs = nil then
|
||||
dataFS:= fs;
|
||||
Result:= dataFS^.mountpoint;
|
||||
if Assigned(dataFs) then
|
||||
Result:= dataFS^.mountpoint;
|
||||
end;
|
||||
|
||||
function TDarwinIOVolumns.getDisplayNameByDeviceID(const deviceID: String;
|
||||
fs: PDarwinStatfs): String;
|
||||
begin
|
||||
Result:= fs^.mountpoint;
|
||||
if fs^.mountpoint = PathDelim then begin
|
||||
Result:= GetVolumeName( fs^.mntfromname );
|
||||
if Result = EmptyStr then
|
||||
Result:= 'System';
|
||||
end else begin
|
||||
Result:= fs^.mountpoint;
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue