mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Merge pull request #6038 from nextcloud/feature/lock-file-store-etag
Store the new etag into local database when opening with auto-locking…
This commit is contained in:
commit
a8b4867b87
2 changed files with 6 additions and 0 deletions
|
@ -104,6 +104,9 @@ void LockFileJob::setFileRecordLocked(SyncJournalFileRecord &record) const
|
||||||
record._lockstate._lockEditorApp = _editorName;
|
record._lockstate._lockEditorApp = _editorName;
|
||||||
record._lockstate._lockTime = _lockTime;
|
record._lockstate._lockTime = _lockTime;
|
||||||
record._lockstate._lockTimeout = _lockTimeout;
|
record._lockstate._lockTimeout = _lockTimeout;
|
||||||
|
if (!_etag.isEmpty()) {
|
||||||
|
record._etag = _etag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LockFileJob::resetState()
|
void LockFileJob::resetState()
|
||||||
|
@ -223,6 +226,8 @@ void LockFileJob::decodeStartElement(const QString &name,
|
||||||
}
|
}
|
||||||
} else if (name == QStringLiteral("lock-owner-editor")) {
|
} else if (name == QStringLiteral("lock-owner-editor")) {
|
||||||
_editorName = reader.readElementText();
|
_editorName = reader.readElementText();
|
||||||
|
} else if (name == QStringLiteral("getetag")) {
|
||||||
|
_etag = reader.readElementText().toUtf8();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ private:
|
||||||
QString _userDisplayName;
|
QString _userDisplayName;
|
||||||
QString _editorName;
|
QString _editorName;
|
||||||
QString _userId;
|
QString _userId;
|
||||||
|
QByteArray _etag;
|
||||||
qint64 _lockTime = 0;
|
qint64 _lockTime = 0;
|
||||||
qint64 _lockTimeout = 0;
|
qint64 _lockTimeout = 0;
|
||||||
QString _remoteSyncPathWithTrailingSlash;
|
QString _remoteSyncPathWithTrailingSlash;
|
||||||
|
|
Loading…
Reference in a new issue