diff options
| -rw-r--r-- | app/FileSystem/sizecalculator.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/FileSystem/sizecalculator.cpp b/app/FileSystem/sizecalculator.cpp index 8e71ced04..9132719fc 100644 --- a/app/FileSystem/sizecalculator.cpp +++ b/app/FileSystem/sizecalculator.cpp @@ -173,5 +173,8 @@ void SizeCalculator::done() void SizeCalculator::emitProgress() { - emit progressChanged(static_cast<int>(((m_urls.length() - m_nextUrls.length()) * 100) / m_urls.length())); + qsizetype muLength = m_urls.length(); + if (muLength > 0) { + emit progressChanged(static_cast<int>(((muLength - m_nextUrls.length()) * 100) / muLength)); + } } |
