Commit a977b237 authored by David Faure's avatar David Faure

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.
parent d6606795
...@@ -99,6 +99,7 @@ void KTimeZoned::init(bool restart) ...@@ -99,6 +99,7 @@ void KTimeZoned::init(bool restart)
config.reparseConfiguration(); config.reparseConfiguration();
KConfigGroup group(&config, "TimeZones"); KConfigGroup group(&config, "TimeZones");
mZoneinfoDir = group.readEntry(ZONEINFO_DIR); mZoneinfoDir = group.readEntry(ZONEINFO_DIR);
mZoneinfoDir = QFileInfo(mZoneinfoDir).canonicalFilePath(); // just in case /usr or /usr/share is a symlink
mZoneTab = group.readEntry(ZONE_TAB); mZoneTab = group.readEntry(ZONE_TAB);
mConfigLocalZone = group.readEntry(LOCAL_ZONE); mConfigLocalZone = group.readEntry(LOCAL_ZONE);
QString ztc = group.readEntry(ZONE_TAB_CACHE, QString()); QString ztc = group.readEntry(ZONE_TAB_CACHE, QString());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment