The Properties dialog for filesystems such as `/proc/` or `/sys/` shows an
incorrect usage percentage (i.e., "-2,147,483,648% used"). This commit fixes
that issue by avoiding a divbyzero: if the `size` variable is `0`, the
`percentUsed` variable is set to `0`.
Gbp-Pq: Name upstream_81ca0e2c_Fix-incorrect-usage-percentage-in-Properties-dialog-for-virtual-filesystems.patch
const qint64 size = job->size();
const qint64 available = job->availableSize();
const quint64 used = size - available;
- const int percentUsed = qRound(100.0 * qreal(used) / qreal(size));
+ const int percentUsed = (size == 0) ? 0 : qRound(100.0 * qreal(used) / qreal(size));
d->m_ui->capacityBar->setText(i18nc("Available space out of total partition size (percent used)",
"%1 free of %2 (%3% used)",