Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-12-17 12:46:36 +0300
committerHannah von Reth <vonreth@kde.org>2021-12-17 18:28:37 +0300
commitf3d9a6ae9227b2edaa4b5c60e04c75e12e114c59 (patch)
tree6330d06840e0b8e4327dab118799beff11c6a5d7 /src/gui/folder.cpp
parentbceac219ce5d47beaa9a35bd64187d0edd63816c (diff)
Handle locks in recursive delete
Diffstat (limited to 'src/gui/folder.cpp')
-rw-r--r--src/gui/folder.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 8ccbf5a37..3e42d50c8 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -605,6 +605,21 @@ void Folder::slotWatchedPathChanged(const QString &path, ChangeReason reason)
const QString relativePath = path.mid(this->path().size());
if (reason == ChangeReason::UnLock) {
journalDb()->wipeErrorBlacklistEntry(relativePath, SyncJournalErrorBlacklistRecord::Category::LocalSoftError);
+
+ {
+ // horrible hack to compensate that we don't handle folder deletes on a per file basis
+ int index = 0;
+ QString p = relativePath;
+ while ((index = p.lastIndexOf(QLatin1Char('/'))) != -1) {
+ p = p.left(index);
+ const auto rec = journalDb()->errorBlacklistEntry(p);
+ if (rec.isValid()) {
+ if (rec._errorCategory == SyncJournalErrorBlacklistRecord::Category::LocalSoftError) {
+ journalDb()->wipeErrorBlacklistEntry(p);
+ }
+ }
+ }
+ }
}
// Add to list of locally modified paths