Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable-3.10] Store the new etag into local database when opening with auto-locking… #6039

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/libsync/lockfilejobs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ void LockFileJob::setFileRecordLocked(SyncJournalFileRecord &record) const
record._lockstate._lockEditorApp = _editorName;
record._lockstate._lockTime = _lockTime;
record._lockstate._lockTimeout = _lockTimeout;
if (!_etag.isEmpty()) {
record._etag = _etag;
}
}

void LockFileJob::resetState()
Expand Down Expand Up @@ -223,6 +226,8 @@ void LockFileJob::decodeStartElement(const QString &name,
}
} else if (name == QStringLiteral("lock-owner-editor")) {
_editorName = reader.readElementText();
} else if (name == QStringLiteral("getetag")) {
_etag = reader.readElementText().toUtf8();
}
}

Expand Down
1 change: 1 addition & 0 deletions src/libsync/lockfilejobs.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class OWNCLOUDSYNC_EXPORT LockFileJob : public AbstractNetworkJob
QString _userDisplayName;
QString _editorName;
QString _userId;
QByteArray _etag;
qint64 _lockTime = 0;
qint64 _lockTimeout = 0;
QString _remoteSyncPathWithTrailingSlash;
Expand Down
Loading