summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2022-12-28 13:47:26 +0200
committerTor Lillqvist <tml@collabora.com>2023-02-24 07:55:10 +0000
commitcae91e5b77c35e8b5cb9b0e543ae049dd0f72fd1 (patch)
treea9dba6fef1567a92c6fa036aa8ee3f95d791d9f3 /desktop
parent9b59231edf524e359ae5bb92517c9f9a98b86030 (diff)
Introduce lo_get_app_data_dir() for Emscripten, too
And not just Android. Hardcoded to return "/instdir" to match what is in the emscripten_fs_image. Change-Id: I26d4ec5e02ec9900e35ca47f1565a13ad2b723b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144849 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147558 Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/lib/init.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 72fab196c38a..452ae0b60a64 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -34,6 +34,10 @@
#include <osl/detail/android-bootstrap.h>
#endif
+#ifdef EMSCRIPTEN
+#include <osl/detail/emscripten-bootstrap.h>
+#endif
+
#include <algorithm>
#include <memory>
#include <iostream>
@@ -7534,10 +7538,8 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
}
else
{
-#ifdef ANDROID
+#if defined ANDROID || defined EMSCRIPTEN
aAppPath = OUString::fromUtf8(lo_get_app_data_dir()) + "/program";
-#elif defined __EMSCRIPTEN__
- aAppPath = OUString::fromUtf8("instdir/program");
#else
// Fun conversion dance back and forth between URLs and system paths...
OUString aAppURL;