when locking a file set If-Match header to ensure etag is correct
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 2 Dec 2024 08:02:13 +0000 (09:02 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 9 Dec 2024 13:39:51 +0000 (14:39 +0100)
commitbd741dcd3e39166c72435ea2846ce8685b64fb23
treef04e9c13180ce47c626a071884a99c1112f2611c
parent63d07ac3994723a95a104f42ccb70c60222a6bb1
when locking a file set If-Match header to ensure etag is correct

the file being locked may have been changed sinc the client synced it

so the server side file may have a modified etag. In such cases we do
not want to lock the file and would rather sync the nex server changes
before being able to lock the file

that would ensure that on client side the file being locked is matching
teh state of teh file on server side and would prevent inadvertently
overriding server changes

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/gui/editlocallyjob.cpp
src/gui/editlocallyjob.h
src/gui/folder.cpp
src/gui/socketapi/socketapi.cpp
src/libsync/account.cpp
src/libsync/account.h
src/libsync/lockfilejobs.cpp
src/libsync/lockfilejobs.h
test/testlockfile.cpp