diff --git a/src/core/deletejob.cpp b/src/core/deletejob.cpp --- a/src/core/deletejob.cpp +++ b/src/core/deletejob.cpp @@ -293,28 +293,17 @@ it = symlinks.begin(); // Pick up a symlink to delete isLink = true; } - // Normal deletion - // If local file, try do it directly - if ((*it).isLocalFile() && QFile::remove((*it).toLocalFile())) { - //kdDebug(7007) << "DeleteJob deleted" << (*it).toLocalFile(); - job = nullptr; - m_processedFiles++; - if (m_processedFiles % 300 == 1 || m_totalFilesDirs < 300) { // update progress info every 300 files - m_currentURL = *it; - slotReport(); - } + + // qDebug() << "calling file_delete on" << *it; + if (isHttpProtocol(it->scheme())) { + job = KIO::http_delete(*it, KIO::HideProgressInfo); } else { - // if remote - or if unlink() failed (we'll use the job's error handling in that case) - //qDebug() << "calling file_delete on" << *it; - if (isHttpProtocol(it->scheme())) { - job = KIO::http_delete(*it, KIO::HideProgressInfo); - } else { - job = KIO::file_delete(*it, KIO::HideProgressInfo); - job->setParentJob(q); - } - Scheduler::setJobPriority(job, 1); - m_currentURL = (*it); + job = KIO::file_delete(*it, KIO::HideProgressInfo); + job->setParentJob(q); } + Scheduler::setJobPriority(job, 1); + m_currentURL = (*it); + if (isLink) { symlinks.erase(it); } else {