Kaydet (Commit) 41427a56 authored tarafından Kacper Kasper's avatar Kacper Kasper Kaydeden (comit) Michael Meeks

sal: use correct settings path for Haiku

* Don't lowercase the name.

Change-Id: I8addd735bf8ee48256ec53f01063e96e7a4b41cd
Reviewed-on: https://gerrit.libreoffice.org/58632
Tested-by: Jenkins
Reviewed-by: 's avatarMichael Meeks <michael.meeks@collabora.com>
üst 5f60f6fe
...@@ -40,7 +40,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_ ...@@ -40,7 +40,7 @@ $(call gb_CustomTarget_get_workdir,instsetoo_native/setup)/$(call gb_Helper_get_
&& echo 'InstallMode=<installmode>' \ && echo 'InstallMode=<installmode>' \
&& echo 'ProductKey=$(PRODUCTNAME) $(PRODUCTVERSION)' \ && echo 'ProductKey=$(PRODUCTNAME) $(PRODUCTVERSION)' \
$(if $(ENABLE_RELEASE_BUILD),\ $(if $(ENABLE_RELEASE_BUILD),\
&& echo 'UserInstallation=$$SYSUSERCONFIG/$(if $(filter-out MACOSX WNT,$(OS)),$(shell echo $(PRODUCTNAME) | tr "[:upper:]" "[:lower:]"),$(shell echo $(PRODUCTNAME) | sed -e 's/ /%20/g'))/4', \ && echo 'UserInstallation=$$SYSUSERCONFIG/$(if $(filter-out HAIKU MACOSX WNT,$(OS)),$(shell echo $(PRODUCTNAME) | tr "[:upper:]" "[:lower:]"),$(shell echo $(PRODUCTNAME) | sed -e 's/ /%20/g'))/4', \
&& echo 'UserInstallation=$$ORIGIN/..') \ && echo 'UserInstallation=$$ORIGIN/..') \
) > $@ ) > $@
......
...@@ -41,6 +41,11 @@ ...@@ -41,6 +41,11 @@
#include <crypt.h> #include <crypt.h>
#endif #endif
#if defined HAIKU
#include <fs_info.h>
#include <FindDirectory.h>
#endif
#include "secimpl.hxx" #include "secimpl.hxx"
#ifdef ANDROID #ifdef ANDROID
...@@ -246,6 +251,18 @@ static bool osl_psz_getHomeDir(oslSecurity Security, sal_Char* pszDirectory, sal ...@@ -246,6 +251,18 @@ static bool osl_psz_getHomeDir(oslSecurity Security, sal_Char* pszDirectory, sal
if (pSecImpl == nullptr) if (pSecImpl == nullptr)
return false; return false;
#ifdef HAIKU
dev_t volume = dev_for_path("/boot");
sal_Char homeDir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
status_t result = find_directory(B_USER_DIRECTORY, volume, false, homeDir,
sizeof(homeDir));
if (result == B_OK && strlen(homeDir) < nMax) {
strcpy(pszDirectory, homeDir);
return true;
}
return false;
#endif
#ifdef ANDROID #ifdef ANDROID
{ {
sal_Bool bRet = sal_False; sal_Bool bRet = sal_False;
...@@ -347,7 +364,23 @@ sal_Bool SAL_CALL osl_getConfigDir(oslSecurity Security, rtl_uString **pustrDire ...@@ -347,7 +364,23 @@ sal_Bool SAL_CALL osl_getConfigDir(oslSecurity Security, rtl_uString **pustrDire
return bRet; return bRet;
} }
#if !defined(MACOSX) && !defined(IOS) #if defined HAIKU
static bool osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax)
{
(void) Security;
dev_t volume = dev_for_path("/boot");
sal_Char configDir[B_PATH_NAME_LENGTH + B_FILE_NAME_LENGTH];
status_t result = find_directory(B_USER_SETTINGS_DIRECTORY, volume, false,
configDir, sizeof(configDir));
if (result == B_OK && strlen(configDir) < nMax) {
strcpy(pszDirectory, configDir);
return true;
}
return false;
}
#elif !defined(MACOSX) && !defined(IOS)
#define DOT_CONFIG "/.config" #define DOT_CONFIG "/.config"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment