From f0714a08f6992e02c5ac3db87c55b51f838a50c6 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Sat, 1 Jun 2024 12:53:44 -0400
Subject: [PATCH] Fix finding message template in linux dev build

---
 indra/newview/llstartup.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index e445cb31925..5650732f72f 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -528,6 +528,15 @@ bool idle_startup()
                 message_template_path = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "app_settings", "message_template.msg");
                 found_template = LLFile::fopen(message_template_path, "r");     /* Flawfinder: ignore */
             }
+        #elif LL_LINUX
+            // On the linux dev builds, unpackaged, the message_template.msg
+            // file will be located in:
+            // build-linux**/newview/packaged/app_settings
+            if (!found_template)
+            {
+                message_template_path = gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "..", "app_settings", "message_template.msg");
+                found_template = LLFile::fopen(message_template_path, "r");     /* Flawfinder: ignore */
+            }
         #elif LL_DARWIN
             // On Mac dev builds, message_template.msg lives in:
             // indra/build-*/newview/<config>/Second Life/Contents/Resources/app_settings
-- 
GitLab