File: fix-paths.patch

package info (click to toggle)
railcontrol 24%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,960 kB
  • sloc: cpp: 39,964; javascript: 2,454; makefile: 103; php: 97; sh: 25
file content (14 lines) | stat: -rw-r--r-- 682 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
RailControl hard-coded searches its files in the working copy. Make it load its files from the FHS compliant installation path instead.
Index: railcontrol/Server/Web/WebClient.cpp
===================================================================
--- railcontrol.orig/Server/Web/WebClient.cpp	2025-05-01 06:03:03.707240816 +0200
+++ railcontrol/Server/Web/WebClient.cpp	2025-05-01 06:03:03.707240816 +0200
@@ -747,7 +747,7 @@
 		char workingDir[128];
 		if (getcwd(workingDir, sizeof(workingDir)))
 		{
-			ss << workingDir << "/html" << virtualFile;
+			ss << "/usr/share/railcontrol/html" << virtualFile;
 		}
 		string sFile = ss.str();
 		const char* realFile = sFile.c_str();