From c0b8b69a5eb1b8e5e36891a373ef3b4d701015ce Mon Sep 17 00:00:00 2001 From: vanhofen Date: Tue, 24 Nov 2020 21:27:02 +0100 Subject: [PATCH] fix 3a7c9c2d18d2c99a17b8997e8a0151d5aa631c68 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/16bead08aeaf4ebce084771170cf6b91b07cd822 Author: vanhofen Date: 2020-11-24 (Tue, 24 Nov 2020) Origin message was: ------------------ - fix 3a7c9c2d18d2c99a17b8997e8a0151d5aa631c68 --- src/gui/osdlang_setup.cpp | 2 +- src/system/setting_helpers.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/osdlang_setup.cpp b/src/gui/osdlang_setup.cpp index e91fcef95..43b8cdf6f 100644 --- a/src/gui/osdlang_setup.cpp +++ b/src/gui/osdlang_setup.cpp @@ -153,7 +153,7 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems() if(zptr) zone = zptr; //printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str()); - if (access("/usr/share/zoneinfo/" + zone, R_OK)) + if (access(TARGET_PREFIX "/share/zoneinfo/" + zone, R_OK)) printf("[neutrino] timezone file '%s' not installed\n", zone.c_str()); else { diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index ef8768260..00abf328f 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(DATADIR "/zoneinfo/" + zone, R_OK)) + if (!access(TARGET_PREFIX "/share/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 = DATADIR "/zoneinfo/" + zone; + std::string cmd = TARGET_PREFIX "/share/zoneinfo/" + zone; printf("symlink %s to /etc/localtime\n", cmd.c_str()); if (unlink("/etc/localtime")) perror("unlink failed");