rio: 0.0.36 -> 0.0.37
[NixPkgs.git] / pkgs / applications / misc / gmrun / find-config-file-in-system-etc-dir.patch
blob12d5370961c01312cb7b2981764eaeb72627447a
1 diff -ur gmrun-0.9.2-orig/src/prefs.cc gmrun-0.9.2/src/prefs.cc
2 --- gmrun-0.9.2-orig/src/prefs.cc 2019-05-02 12:56:39.025088361 +0200
3 +++ gmrun-0.9.2/src/prefs.cc 2019-05-02 13:21:51.179778620 +0200
4 @@ -31,9 +31,11 @@
6 Prefs::Prefs()
8 - string file_name = PACKAGE_DATA_DIR"/";
9 - file_name += GMRUNRC;
10 - init(file_name);
11 + string file_name = "/etc/" GMRUNRC;
12 + if (!init(file_name)) {
13 + file_name = PACKAGE_DATA_DIR "/" GMRUNRC;;
14 + init(file_name);
15 + }
17 file_name = getenv("HOME");
18 if (!file_name.empty()) {