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-13 20:55:24 +0300
committerHannah von Reth <hannah.vonreth@owncloud.com>2021-12-13 20:55:24 +0300
commit9f5a57b08584deafd2874e5797becac77753ebd6 (patch)
treef9204516c493cc7ea2359bbad928961888cc774b /src/common
parent4fbf5e21b3678613df4400587c44f555044f3e40 (diff)
parentf776818cf599a55df4431dc21a20173e6a9d11bf (diff)
Merge remote-tracking branch 'origin/2.10'
Diffstat (limited to 'src/common')
-rw-r--r--src/common/syncjournaldb.cpp7
-rw-r--r--src/common/syncjournaldb.h2
-rw-r--r--src/common/syncjournalfilerecord.h7
3 files changed, 10 insertions, 6 deletions
diff --git a/src/common/syncjournaldb.cpp b/src/common/syncjournaldb.cpp
index 59b7ea1e4..7efb6219d 100644
--- a/src/common/syncjournaldb.cpp
+++ b/src/common/syncjournaldb.cpp
@@ -1608,18 +1608,19 @@ int SyncJournalDb::wipeErrorBlacklist()
return -1;
}
-void SyncJournalDb::wipeErrorBlacklistEntry(const QString &file)
+void SyncJournalDb::wipeErrorBlacklistEntry(const QString &relativeFile)
{
- if (file.isEmpty()) {
+ if (relativeFile.isEmpty()) {
return;
}
+ Q_ASSERT(QFileInfo(relativeFile).isRelative());
QMutexLocker locker(&_mutex);
if (checkConnect()) {
SqlQuery query(_db);
query.prepare("DELETE FROM blacklist WHERE path=?1");
- query.bindValue(1, file);
+ query.bindValue(1, relativeFile);
if (!query.exec()) {
sqlFail(QStringLiteral("Deletion of blacklist item failed."), query);
}
diff --git a/src/common/syncjournaldb.h b/src/common/syncjournaldb.h
index 03a222304..59de21e69 100644
--- a/src/common/syncjournaldb.h
+++ b/src/common/syncjournaldb.h
@@ -87,7 +87,7 @@ public:
static qint64 getPHash(const QByteArray &);
void setErrorBlacklistEntry(const SyncJournalErrorBlacklistRecord &item);
- void wipeErrorBlacklistEntry(const QString &file);
+ void wipeErrorBlacklistEntry(const QString &relativeFile);
void wipeErrorBlacklistCategory(SyncJournalErrorBlacklistRecord::Category category);
int wipeErrorBlacklist();
int errorBlackListEntryCount();
diff --git a/src/common/syncjournalfilerecord.h b/src/common/syncjournalfilerecord.h
index 5c88f91d4..4d8e95926 100644
--- a/src/common/syncjournalfilerecord.h
+++ b/src/common/syncjournalfilerecord.h
@@ -67,13 +67,16 @@ operator==(const SyncJournalFileRecord &lhs,
class OCSYNC_EXPORT SyncJournalErrorBlacklistRecord
{
+ Q_GADGET
public:
- enum Category {
+ enum class Category {
/// Normal errors have no special behavior
Normal = 0,
/// These get a special summary message
- InsufficientRemoteStorage
+ InsufficientRemoteStorage,
+ LocalSoftError
};
+ Q_ENUM(Category)
SyncJournalErrorBlacklistRecord()
: _retryCount(0)