- fix 56fb558f1cb04056d451cfe55c1631381889f6a4

Signed-off-by: Thilo Graf <dbt@novatux.de>

commit was: - setting_helpers: remove some hardcoded paths

d5950fbe60226f8eb999c561f6ddc543f709e807
This commit is contained in:
svenhoefer
2020-11-24 21:27:02 +01:00
committed by Thilo Graf
parent 7e66bb8364
commit 28d5e66f90
2 changed files with 3 additions and 3 deletions

View File

@@ -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
{

View File

@@ -498,7 +498,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;
}
@@ -509,7 +509,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");