Commit 1b9726e2 authored by David Faure's avatar David Faure

CopyJob: replaced huge recursion with delayed invocation.

Otherwise there's a risk of filling up the stack, when copying a very
large number of files (and they are all available in the KDirLister cache).

BUG: 319747
FIXED-IN: 4.10.4
parent bbae2fa9
......@@ -784,7 +784,8 @@ void CopyJobPrivate::statCurrentSrc()
// entries for UDS_USER and UDS_GROUP even on initially empty UDSEntries (#192185)
if (entry.contains(KIO::UDSEntry::UDS_NAME)) {
kDebug(7007) << "fast path! found info about" << m_currentSrcURL << "in KDirLister";
sourceStated(entry, m_currentSrcURL);
// sourceStated(entry, m_currentSrcURL); // don't recurse, see #319747, use queued invokeMethod instead
QMetaObject::invokeMethod(q, "sourceStated", Qt::QueuedConnection, Q_ARG(KIO::UDSEntry, entry), Q_ARG(KUrl, m_currentSrcURL));
return;
}
......
......@@ -259,10 +259,11 @@ namespace KIO {
private:
Q_PRIVATE_SLOT(d_func(), void slotStart())
Q_PRIVATE_SLOT(d_func(), void slotEntries( KIO::Job*, const KIO::UDSEntryList& list ))
Q_PRIVATE_SLOT(d_func(), void slotSubError( KIO::ListJob*, KIO::ListJob* ))
Q_PRIVATE_SLOT(d_func(), void slotSubError(KIO::ListJob*, KIO::ListJob*))
Q_PRIVATE_SLOT(d_func(), void slotProcessedSize( KJob*, qulonglong data_size ))
Q_PRIVATE_SLOT(d_func(), void slotTotalSize( KJob*, qulonglong size ))
Q_PRIVATE_SLOT(d_func(), void slotReport())
Q_PRIVATE_SLOT(d_func(), void sourceStated(const KIO::UDSEntry& entry, const KUrl& sourceUrl))
Q_DECLARE_PRIVATE(CopyJob)
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment