A timezone is a file, not a directory.
This commit is contained in:
parent
9ce55bfb83
commit
1d6c41e94d
@ -24,6 +24,7 @@
|
|||||||
#include "utils/CalamaresUtilsSystem.h"
|
#include "utils/CalamaresUtilsSystem.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QFileInfo>
|
||||||
|
|
||||||
|
|
||||||
SetTimezoneJob::SetTimezoneJob( const QString& region, const QString& zone )
|
SetTimezoneJob::SetTimezoneJob( const QString& region, const QString& zone )
|
||||||
@ -49,10 +50,10 @@ SetTimezoneJob::exec()
|
|||||||
zoneinfoPath.append( QDir::separator() + m_zone );
|
zoneinfoPath.append( QDir::separator() + m_zone );
|
||||||
|
|
||||||
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
|
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
|
||||||
QDir zoneDir( gs->value( "rootMountPoint" ).toString() + zoneinfoPath );
|
QFileInfo zoneFile( gs->value( "rootMountPoint" ).toString() + zoneinfoPath );
|
||||||
if ( !zoneDir.exists() || !zoneDir.isReadable() )
|
if ( !zoneFile.exists() || !zoneFile.isReadable() )
|
||||||
return Calamares::JobResult::error( tr( "Cannot access timezone directory." ),
|
return Calamares::JobResult::error( tr( "Cannot access selected timezone path." ),
|
||||||
tr( "Bad path: %1" ).arg( zoneDir.absolutePath() ) );
|
tr( "Bad path: %1" ).arg( zoneFile.absolutePath() ) );
|
||||||
|
|
||||||
int ec = CalamaresUtils::chrootCall( { "ln",
|
int ec = CalamaresUtils::chrootCall( { "ln",
|
||||||
"-s",
|
"-s",
|
||||||
|
Loading…
Reference in New Issue
Block a user