mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
UPD: Use mbFindDirectory to get system folders
This commit is contained in:
parent
a9cb957984
commit
4a0e9aacd3
1 changed files with 23 additions and 4 deletions
|
|
@ -60,7 +60,9 @@ uses
|
|||
, BaseUnix, Unix, DCUnix
|
||||
{$IF DEFINED(DARWIN)}
|
||||
, CocoaAll, uMyDarwin
|
||||
{$ELSEIF NOT DEFINED(HAIKU)}
|
||||
{$ELSEIF DEFINED(HAIKU)}
|
||||
, DCHaiku
|
||||
{$ELSE}
|
||||
, uXdg
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
|
@ -73,6 +75,11 @@ begin
|
|||
end;
|
||||
{$ELSE}
|
||||
begin
|
||||
{$IF DEFINED(HAIKU)}
|
||||
if mbFindDirectory(B_USER_DIRECTORY, -1, True, Result) then
|
||||
Result:= ExcludeBackPathDelimiter(Result)
|
||||
else
|
||||
{$ENDIF}
|
||||
Result:= ExcludeBackPathDelimiter(SysToUTF8(GetEnvironmentVariable('HOME')));
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
|
@ -112,7 +119,11 @@ begin
|
|||
end;
|
||||
{$ELSEIF DEFINED(HAIKU)}
|
||||
begin
|
||||
Result:= GetHomeDir + '/config/settings/' + ApplicationName;
|
||||
if mbFindDirectory(B_USER_SETTINGS_DIRECTORY, -1, True, Result) then
|
||||
Result:= IncludeTrailingBackslash(Result) + ApplicationName
|
||||
else begin
|
||||
Result:= GetHomeDir + '/config/settings/' + ApplicationName;
|
||||
end;
|
||||
end;
|
||||
{$ELSE}
|
||||
var
|
||||
|
|
@ -142,7 +153,11 @@ begin
|
|||
end;
|
||||
{$ELSEIF DEFINED(HAIKU)}
|
||||
begin
|
||||
Result:= GetHomeDir + '/config/cache/' + ApplicationName;
|
||||
if mbFindDirectory(B_USER_CACHE_DIRECTORY, -1, True, Result) then
|
||||
Result:= IncludeTrailingBackslash(Result) + ApplicationName
|
||||
else begin
|
||||
Result:= GetHomeDir + '/config/cache/' + ApplicationName;
|
||||
end;
|
||||
end;
|
||||
{$ELSE}
|
||||
var
|
||||
|
|
@ -167,7 +182,11 @@ begin
|
|||
end;
|
||||
{$ELSEIF DEFINED(HAIKU)}
|
||||
begin
|
||||
Result:= GetAppConfigDir;
|
||||
if mbFindDirectory(B_USER_DATA_DIRECTORY, -1, True, Result) then
|
||||
Result:= IncludeTrailingBackslash(Result) + ApplicationName
|
||||
else begin
|
||||
Result:= GetHomeDir + '/config/data/' + ApplicationName;
|
||||
end;
|
||||
end;
|
||||
{$ELSE}
|
||||
begin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue