From a977b2378ff4d88b561d599a1116821c694493f1 Mon Sep 17 00:00:00 2001 From: David Faure Date: Tue, 16 Dec 2014 18:35:18 +0100 Subject: [PATCH] Don't let the timezone end up as "/etc/localtime" (literally). This was happening on systems where /usr/share was a symlink (due to lack of space) (I realize now that mount --bind would have been much better). Since the code does canonicalFilePath + startsWith(dir), we need to use canonicalFilePath on dir too. --- ktimezoned/ktimezoned.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ktimezoned/ktimezoned.cpp b/ktimezoned/ktimezoned.cpp index f380c0970c..d92c899dab 100644 --- a/ktimezoned/ktimezoned.cpp +++ b/ktimezoned/ktimezoned.cpp @@ -99,6 +99,7 @@ void KTimeZoned::init(bool restart) config.reparseConfiguration(); KConfigGroup group(&config, "TimeZones"); mZoneinfoDir = group.readEntry(ZONEINFO_DIR); + mZoneinfoDir = QFileInfo(mZoneinfoDir).canonicalFilePath(); // just in case /usr or /usr/share is a symlink mZoneTab = group.readEntry(ZONE_TAB); mConfigLocalZone = group.readEntry(LOCAL_ZONE); QString ztc = group.readEntry(ZONE_TAB_CACHE, QString()); -- GitLab