diff options
Diffstat (limited to 'xdg_data_dir.patch')
-rw-r--r-- | xdg_data_dir.patch | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/xdg_data_dir.patch b/xdg_data_dir.patch new file mode 100644 index 000000000000..ad223dd01fb5 --- /dev/null +++ b/xdg_data_dir.patch @@ -0,0 +1,21 @@ +diff --git a/Source_Files/CSeries/cspaths_sdl.cpp b/Source_Files/CSeries/cspaths_sdl.cpp +index b562c908..50b04b54 100644 +--- a/Source_Files/CSeries/cspaths_sdl.cpp ++++ b/Source_Files/CSeries/cspaths_sdl.cpp +@@ -176,9 +176,14 @@ static std::string _get_local_data_path() + static std::string local_dir = ""; + if (local_dir.empty()) + { +- const char *home = getenv("HOME"); ++ const char *home = getenv("XDG_DATA_HOME"); + if (home) +- local_dir = std::string(home) + "/.alephone"; ++ local_dir = std::string(home) + "/alephone"; ++ else { ++ home = getenv("HOME"); ++ if (home) ++ local_dir = std::string(home) + "/.local/share/alephone"; ++ } + } + return local_dir; + } |