fix bug 171608,【文件管理器】复制包含100个文件的文件夹,进度条一直显示0.0%

This commit is contained in:
lizhuoan 2023-05-23 14:24:13 +08:00 committed by Yue-Lan
parent 0513241a8b
commit 3d122cb140
2 changed files with 2 additions and 1 deletions

View File

@ -312,6 +312,7 @@ void FileCopy::run ()
if (0 == readSize && nullptr == error) {
mStatus = FINISHED;
mPause.unlock();
updateProgress ();
continue;
} else if (nullptr != error) {
detailError(&error);

View File

@ -1038,7 +1038,7 @@ void ProgressBar::updateProgress(const QString &srcUri, const QString &destUri,
double currentPercent = current * 1.0 / total;
//fix bug#133624,133380, delete all empty files, not update progress bar
if (m_total_size <= 0){
if (m_total_size <= 0 || 16 * m_total_count <= m_total_size){
m_update_count++;
currentPercent = m_update_count * 1.0 /m_total_count;
}