depot/third_party/nixpkgs/pkgs/applications/misc/gmrun/find-config-file-in-system-etc-dir.patch
Default email 8ac5e011d6 Project import generated by Copybara.
GitOrigin-RevId: 2c3273caa153ee8eb5786bc8141b85b859e7efd7
2020-04-24 19:36:52 -04:00

18 lines
530 B
Diff

diff -ur gmrun-0.9.2-orig/src/prefs.cc gmrun-0.9.2/src/prefs.cc
--- gmrun-0.9.2-orig/src/prefs.cc 2019-05-02 12:56:39.025088361 +0200
+++ gmrun-0.9.2/src/prefs.cc 2019-05-02 13:21:51.179778620 +0200
@@ -31,9 +31,11 @@
Prefs::Prefs()
{
- string file_name = PACKAGE_DATA_DIR"/";
- file_name += GMRUNRC;
- init(file_name);
+ string file_name = "/etc/" GMRUNRC;
+ if (!init(file_name)) {
+ file_name = PACKAGE_DATA_DIR "/" GMRUNRC;;
+ init(file_name);
+ }
file_name = getenv("HOME");
if (!file_name.empty()) {