mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-26 17:05:36 -04:00
Try running fsck twice before giving up.
This commit is contained in:
parent
fba8e448bb
commit
e7c5a2b1a5
1 changed files with 14 additions and 5 deletions
|
@ -18,6 +18,8 @@
|
|||
|
||||
#include "jobs/CheckFileSystemJob.h"
|
||||
|
||||
#include <utils/Logger.h>
|
||||
|
||||
// KPMcore
|
||||
#include <kpmcore/core/partition.h>
|
||||
#include <kpmcore/fs/filesystem.h>
|
||||
|
@ -54,11 +56,18 @@ CheckFileSystemJob::exec()
|
|||
Report report( nullptr );
|
||||
bool 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()
|
||||
);
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue