Skip to content

Commit

Permalink
Handle missing etag bug owncloud/ocis#7160
Browse files Browse the repository at this point in the history
  • Loading branch information
TheOneRing committed Aug 30, 2023
1 parent 7113c91 commit 650927c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/gui/scheduling/etagwatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,16 @@ ETagWatcher::ETagWatcher(FolderMan *folderMan, QObject *parent)

void ETagWatcher::updateEtag(Folder *f, const QString &etag)
{
Q_ASSERT(!etag.isEmpty());
auto &info = _lastEtagJob[f];
if (info.etag != etag) {
info.etag = etag;
_folderMan->scheduler()->enqueueFolder(f);
// the server must provide a valid etag but there might be bugs
// https://github.com/owncloud/ocis/issues/7160
if (OC_ENSURE(etag.isEmpty())) {
auto &info = _lastEtagJob[f];
if (info.etag != etag) {
info.etag = etag;
_folderMan->scheduler()->enqueueFolder(f);
}
info.lastUpdate.reset();
}
info.lastUpdate.reset();
}

void ETagWatcher::startOC10EtagJob(Folder *f)
Expand Down

0 comments on commit 650927c

Please sign in to comment.