diff --git a/src/core/copyjob.cpp b/src/core/copyjob.cpp --- a/src/core/copyjob.cpp +++ b/src/core/copyjob.cpp @@ -848,7 +848,7 @@ } } - // if the file system doesn't support deleting, we do not even stat + // if the source file system doesn't support deleting, we do not even stat if (m_mode == CopyJob::Move && !KProtocolManager::supportsDeleting(m_currentSrcURL)) { QPointer that = q; emit q->warning(q, buildErrorString(ERR_CANNOT_DELETE, m_currentSrcURL.toDisplayString())); @@ -858,6 +858,16 @@ return; } + // if the destination file system doesn't support writing, do not stat + if ((m_mode == CopyJob::Copy || m_mode == CopyJob::Move) && !KProtocolManager::supportsWriting(m_currentDestURL)) { + QPointer that = q; + emit q->warning(q, buildErrorString(ERR_CYCLIC_COPY, m_currentDestURL.toDisplayString())); + if (that) { + statNextSrc(); + } + return; + } + m_bOnlyRenames = false; // Testing for entry.count()>0 here is not good enough; KFileItem inserts