Correctly report used space of FAT partitions whose dirty bit is set.
BUG: 366313
This commit is contained in:
parent
465aec251d
commit
ea99bcc76f
|
@ -97,7 +97,7 @@ qint32 OperationRunner::numJobs() const
|
||||||
qint32 result = 0;
|
qint32 result = 0;
|
||||||
|
|
||||||
foreach(const Operation * op, operationStack().operations())
|
foreach(const Operation * op, operationStack().operations())
|
||||||
result += op->jobs().size();
|
result += op->jobs().size();
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ qint64 fat16::readUsedCapacity(const QString& deviceNode) const
|
||||||
{
|
{
|
||||||
ExternalCommand cmd(QStringLiteral("fsck.msdos"), { QStringLiteral("-n"), QStringLiteral("-v"), deviceNode });
|
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;
|
qint64 usedClusters = -1;
|
||||||
QRegularExpression re(QStringLiteral("files, (\\d+)/\\d+ "));
|
QRegularExpression re(QStringLiteral("files, (\\d+)/\\d+ "));
|
||||||
QRegularExpressionMatch reClusters = re.match(cmd.output());
|
QRegularExpressionMatch reClusters = re.match(cmd.output());
|
||||||
|
|
Loading…
Reference in New Issue