mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
fix 3a7c9c2d18
Origin commit data ------------------ Commit:16bead08ae
Author: vanhofen <vanhofen@gmx.de> Date: 2020-11-24 (Tue, 24 Nov 2020) Origin message was: ------------------ - fix3a7c9c2d18
This commit is contained in:
@@ -153,7 +153,7 @@ CMenuOptionStringChooser* COsdLangSetup::getTzItems()
|
|||||||
if(zptr)
|
if(zptr)
|
||||||
zone = zptr;
|
zone = zptr;
|
||||||
//printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str());
|
//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());
|
printf("[neutrino] timezone file '%s' not installed\n", zone.c_str());
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -610,7 +610,7 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
|
|||||||
const char *zptr = xmlGetAttribute(search, "zone");
|
const char *zptr = xmlGetAttribute(search, "zone");
|
||||||
if(zptr)
|
if(zptr)
|
||||||
zone = zptr;
|
zone = zptr;
|
||||||
if (!access(DATADIR "/zoneinfo/" + zone, R_OK))
|
if (!access(TARGET_PREFIX "/share/zoneinfo/" + zone, R_OK))
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -621,7 +621,7 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
|
|||||||
}
|
}
|
||||||
if(found) {
|
if(found) {
|
||||||
printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str());
|
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());
|
printf("symlink %s to /etc/localtime\n", cmd.c_str());
|
||||||
if (unlink("/etc/localtime"))
|
if (unlink("/etc/localtime"))
|
||||||
perror("unlink failed");
|
perror("unlink failed");
|
||||||
|
Reference in New Issue
Block a user