From 19c8d5bb3849aa08ed06cc3513b361615ccbfd53 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 3 Jul 2023 17:41:22 +0200 Subject: [PATCH] (Linux) The esBinary variable is now set correctly when running as an AppImage --- es-core/src/utils/FileSystemUtil.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/es-core/src/utils/FileSystemUtil.cpp b/es-core/src/utils/FileSystemUtil.cpp index 326d67181..adeb0a816 100644 --- a/es-core/src/utils/FileSystemUtil.cpp +++ b/es-core/src/utils/FileSystemUtil.cpp @@ -338,6 +338,13 @@ namespace Utils } if (isRegularFile(exePath)) exePath = getParent(exePath); + +#if defined(APPIMAGE_BUILD) + // We need to check that the APPIMAGE variable is available as the APPIMAGE_BUILD + // build flag could have been passed without running as an actual AppImage. + if (getenv("APPIMAGE") != nullptr) + esBinary = getenv("APPIMAGE"); +#endif } std::string getExePath()