From: =?utf-8?q?Andreas_R=C3=B6nnquist?= <gusnan@debian.org>
Date: Fri, 22 Nov 2024 18:37:29 +0100
Subject: Fix finding data when it's installed to linux system locations

---
 src/common/global.cpp | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/common/global.cpp b/src/common/global.cpp
index 5f6f5f3..32c8728 100755
--- a/src/common/global.cpp
+++ b/src/common/global.cpp
@@ -193,12 +193,18 @@ bool C_Global::FindDataPath(const char *szDataFile)
 			//try exe_path/-Resources (Mac sandbox)
 			sprintf(szDataPath, "%s/../Contents/Resources/data", szExePath);
 			FixPath(szDataPath);
-			sprintf(szPath, "%s/%s", szDataPath, szDataFile);
-			pFile = fopen(szPath, "rb");
-		}
-		if (!pFile) {
-			szDataPath[0] = 0;
-		}
+			sprintf(szPath, "%s/%s", szDataPath, szDataFile);
+			pFile = fopen(szPath, "rb");
+		}
+		if (!pFile) {
+			sprintf(szDataPath, "/usr/share/boulder-game");
+			FixPath(szDataPath);
+			sprintf(szPath, "%s/%s", szDataPath, szDataFile);
+			pFile = fopen(szPath, "rb");
+		}
+		if (!pFile) {
+			szDataPath[0] = 0;
+		}
 		if (pFile) fclose(pFile);
 	}
 	return szDataPath[0] != 0;
