From ea99bcc76fd92d85182445c5a80eac2590e7c53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Tue, 2 Aug 2016 21:41:09 +0100 Subject: [PATCH] Correctly report used space of FAT partitions whose dirty bit is set. BUG: 366313 --- src/core/operationrunner.cpp | 2 +- src/fs/fat16.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/operationrunner.cpp b/src/core/operationrunner.cpp index 25a729a..c08672f 100644 --- a/src/core/operationrunner.cpp +++ b/src/core/operationrunner.cpp @@ -97,7 +97,7 @@ qint32 OperationRunner::numJobs() const qint32 result = 0; foreach(const Operation * op, operationStack().operations()) - result += op->jobs().size(); + result += op->jobs().size(); return result; } diff --git a/src/fs/fat16.cpp b/src/fs/fat16.cpp index f553afc..d01678b 100644 --- a/src/fs/fat16.cpp +++ b/src/fs/fat16.cpp @@ -106,7 +106,7 @@ qint64 fat16::readUsedCapacity(const QString& deviceNode) const { ExternalCommand cmd(QStringLiteral("fsck.msdos"), { QStringLiteral("-n"), QStringLiteral("-v"), deviceNode }); - if (cmd.run(-1) && cmd.exitCode() == 0) { + if (cmd.run(-1) && (cmd.exitCode() == 0 || cmd.exitCode() == 1)) { qint64 usedClusters = -1; QRegularExpression re(QStringLiteral("files, (\\d+)/\\d+ ")); QRegularExpressionMatch reClusters = re.match(cmd.output());