From 8459ee1cb2932ee9073270e7d497844300462e4f Mon Sep 17 00:00:00 2001 From: Unrud Date: Thu, 3 Mar 2022 21:57:19 +0100 Subject: [PATCH] Fix broken paths in default configuraiton on Unix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The default paths for **FileSearch.Directories** and **SoundfontSearch.Directories** are somewhat broken. `SHARE_DIR` is defined as just `/usr/local/share/`. The paths `…/games/raze` are not added to **FileSearch.Directories**. `GAME_DIR` is defined as `.config/raze` on Unix. Combining it with the prefix `…/share/` is wrong. Excerpt from the default configuration: ```ini [FileSearch.Directories] … Path=/usr/local/share/ … [SoundfontSearch.Directories] … Path=/usr/local/share/.config/raze/soundfonts Path=/usr/local/share/games/.config/raze/soundfonts Path=/usr/share/.config/raze/soundfonts Path=/usr/share/games/.config/raze/soundfonts ``` --- source/core/gameconfigfile.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/core/gameconfigfile.cpp b/source/core/gameconfigfile.cpp index de8df7921..8b0b0c756 100644 --- a/source/core/gameconfigfile.cpp +++ b/source/core/gameconfigfile.cpp @@ -134,7 +134,8 @@ FGameConfigFile::FGameConfigFile () SetValueForKey ("Path", "$GAMEDIR", true); #else SetValueForKey ("Path", "$HOME/" GAME_DIR, true); - SetValueForKey ("Path", SHARE_DIR, true); + SetValueForKey ("Path", "/usr/share/games/raze", true); + SetValueForKey ("Path", "/usr/local/share/games/raze", true); SetValueForKey ("Path", "/usr/share/games/jfduke3d", true); SetValueForKey ("Path", "/usr/local/share/games/jfduke3d", true); SetValueForKey ("Path", "/usr/share/games/eduke32", true); @@ -157,10 +158,8 @@ FGameConfigFile::FGameConfigFile () SetValueForKey("Path", "$PROGDIR/soundfonts", true); #else SetValueForKey("Path", "$HOME/" GAME_DIR "/soundfonts", true); - SetValueForKey("Path", "/usr/local/share/" GAME_DIR "/soundfonts", true); - SetValueForKey("Path", "/usr/local/share/games/" GAME_DIR "/soundfonts", true); - SetValueForKey("Path", "/usr/share/" GAME_DIR "/soundfonts", true); - SetValueForKey("Path", "/usr/share/games/" GAME_DIR "/soundfonts", true); + SetValueForKey("Path", "/usr/share/games/raze/soundfonts", true); + SetValueForKey("Path", "/usr/local/share/games/raze/soundfonts", true); #endif }