From 1d6c41e94d805ed093b9db640242398bb4b2847f Mon Sep 17 00:00:00 2001 From: Teo Mrnjavac Date: Mon, 4 Aug 2014 21:47:44 +0200 Subject: [PATCH] A timezone is a file, not a directory. --- src/modules/locale/SetTimezoneJob.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/locale/SetTimezoneJob.cpp b/src/modules/locale/SetTimezoneJob.cpp index d47b32532..5ae908446 100644 --- a/src/modules/locale/SetTimezoneJob.cpp +++ b/src/modules/locale/SetTimezoneJob.cpp @@ -24,6 +24,7 @@ #include "utils/CalamaresUtilsSystem.h" #include +#include SetTimezoneJob::SetTimezoneJob( const QString& region, const QString& zone ) @@ -49,10 +50,10 @@ SetTimezoneJob::exec() zoneinfoPath.append( QDir::separator() + m_zone ); Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage(); - QDir zoneDir( gs->value( "rootMountPoint" ).toString() + zoneinfoPath ); - if ( !zoneDir.exists() || !zoneDir.isReadable() ) - return Calamares::JobResult::error( tr( "Cannot access timezone directory." ), - tr( "Bad path: %1" ).arg( zoneDir.absolutePath() ) ); + QFileInfo zoneFile( gs->value( "rootMountPoint" ).toString() + zoneinfoPath ); + if ( !zoneFile.exists() || !zoneFile.isReadable() ) + return Calamares::JobResult::error( tr( "Cannot access selected timezone path." ), + tr( "Bad path: %1" ).arg( zoneFile.absolutePath() ) ); int ec = CalamaresUtils::chrootCall( { "ln", "-s",