diff --git a/src/core/copyjob.cpp b/src/core/copyjob.cpp --- a/src/core/copyjob.cpp +++ b/src/core/copyjob.cpp @@ -806,13 +806,12 @@ qCDebug(KIO_COPYJOB_DEBUG) << "Setting m_dest to" << m_dest; destinationState = m_globalDestinationState; ++m_currentStatSrc; - statCurrentSrc(); } void CopyJobPrivate::statCurrentSrc() { Q_Q(CopyJob); - if (m_currentStatSrc != m_srcList.constEnd()) { + while (m_currentStatSrc != m_srcList.constEnd()) { m_currentSrcURL = (*m_currentStatSrc); m_bURLDirty = true; if (m_mode == CopyJob::Link) { @@ -848,7 +847,7 @@ } files.append(info); // Files and any symlinks statNextSrc(); // we could use a loop instead of a recursive call :) - return; + continue; } // Let's see if we can skip stat'ing, for the case where a directory view has the info already @@ -892,7 +891,7 @@ if (that) { statNextSrc(); // we could use a loop instead of a recursive call :) } - return; + continue; } m_bOnlyRenames = false; @@ -913,7 +912,9 @@ q->addSubjob(job); m_currentDestURL = m_dest; m_bURLDirty = true; - } else { + } + + { // Finished the stat'ing phase // First make sure that the totals were correctly emitted state = STATE_STATING;