Try running fsck twice before giving up.

This commit is contained in:
Teo Mrnjavac 2016-06-17 12:07:57 +02:00
parent fba8e448bb
commit e7c5a2b1a5

View File

@ -18,6 +18,8 @@
#include "jobs/CheckFileSystemJob.h"
#include <utils/Logger.h>
// KPMcore
#include <kpmcore/core/partition.h>
#include <kpmcore/fs/filesystem.h>
@ -53,12 +55,19 @@ CheckFileSystemJob::exec()
Report report( nullptr );
bool ok = fs.check( report, partition()->partitionPath() );
if ( !ok )
{
cDebug() << "Filesystem check failed for" << partition()->partitionPath()
<< ", retrying...";
ok = fs.check( report, partition()->partitionPath() );
if ( !ok )
return Calamares::JobResult::error(
tr( "The file system check on partition %1 failed." )
.arg( partition()->partitionPath() ),
report.toText()
);
}
return Calamares::JobResult::ok();
}