diff --git a/src/jobs/checkfilesystemjob.cpp b/src/jobs/checkfilesystemjob.cpp index 9ac2a19..866de6a 100644 --- a/src/jobs/checkfilesystemjob.cpp +++ b/src/jobs/checkfilesystemjob.cpp @@ -24,6 +24,9 @@ #include "util/report.h" +#include +#include + #include /** Creates a new CheckFileSystemJob @@ -45,6 +48,15 @@ bool CheckFileSystemJob::run(Report& parent) if (partition().fileSystem().supportCheck() == FileSystem::cmdSupportFileSystem) rval = partition().fileSystem().check(*report, partition().deviceNode()); + // HACK + // In rare cases after moving file system to a new location file system check + // fails on the first try. As a temporary workaround, wait a bit and try again. + if (!rval) { + QThread::sleep(2); + qDebug() << "Partition might not be ready yet. Retrying..."; + rval = partition().fileSystem().check(*report, partition().deviceNode()); + } + jobFinished(*report, rval); return rval;