From 3a7c9c2d18d2c99a17b8997e8a0151d5aa631c68 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 23 Nov 2020 21:28:37 +0100 Subject: [PATCH] setting_helpers: remove some hardcoded paths Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/56fb558f1cb04056d451cfe55c1631381889f6a4 Author: vanhofen Date: 2020-11-23 (Mon, 23 Nov 2020) Origin message was: ------------------ - setting_helpers: remove some hardcoded paths --- src/system/setting_helpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index b0bc04095..ef8768260 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -610,7 +610,7 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data) const char *zptr = xmlGetAttribute(search, "zone"); if(zptr) zone = zptr; - if (!access("/usr/share/zoneinfo/" + zone, R_OK)) + if (!access(DATADIR "/zoneinfo/" + zone, R_OK)) found = true; break; } @@ -621,7 +621,7 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data) } if(found) { printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str()); - std::string cmd = "/usr/share/zoneinfo/" + zone; + std::string cmd = DATADIR "/zoneinfo/" + zone; printf("symlink %s to /etc/localtime\n", cmd.c_str()); if (unlink("/etc/localtime")) perror("unlink failed");