summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElvis Angelaccio <elvis.angelaccio@kde.org>2016-10-23 12:00:34 (GMT)
committerElvis Angelaccio <elvis.angelaccio@kde.org>2016-10-23 13:08:53 (GMT)
commit9edb02c22feb2c01e056e967abf1626caed8f7a5 (patch)
tree2d048143145ea60fc6ece5cd750c237d8f3c056b
parent5a591d39a834c74840309bc3268090c8cbcc5608 (diff)
libarchive: don't hang when aborting read-write jobs
The while loop in `ReadWriteLibarchivePlugin::processOldEntries()` has a wrong check in the entering condition. This prevents any job type but AddJob from being aborted. Differential Revision: D3139
-rw-r--r--plugins/libarchive/readwritelibarchiveplugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/libarchive/readwritelibarchiveplugin.cpp b/plugins/libarchive/readwritelibarchiveplugin.cpp
index dd71f8e..aa76216 100644
--- a/plugins/libarchive/readwritelibarchiveplugin.cpp
+++ b/plugins/libarchive/readwritelibarchiveplugin.cpp
@@ -408,7 +408,7 @@ bool ReadWriteLibarchivePlugin::processOldEntries(int &entriesCounter, Operation
}
}
- while ((mode != Add || !QThread::currentThread()->isInterruptionRequested()) && archive_read_next_header(m_archiveReader.data(), &entry) == ARCHIVE_OK) {
+ while (!QThread::currentThread()->isInterruptionRequested() && archive_read_next_header(m_archiveReader.data(), &entry) == ARCHIVE_OK) {
const QString file = QFile::decodeName(archive_entry_pathname(entry));