nextcloud / files_lock

GNU Affero General Public License v3.0
24 stars 8 forks source link

lock/unlock should not update the file etag #147

Closed juliushaertl closed 1 year ago

juliushaertl commented 1 year ago

As mentioned by @camilasan and @mgallien in chat, updating the file etag if the lock state changed is not good as the desktop client would resync the file in this case.

We should evaluate if we can just update the parent folders etag. This should trigger a sync of the propfind data and probably be enough to update the lock state on the clients.

I'll see if there is an easy way to do that so it could be tested with:

https://github.com/nextcloud/server/issues/8477 would be nicer but maybe we can have the above as a short term solution

FYI @tobiasKaminsky

juliushaertl commented 1 year ago

Unfortunately this approach has shown some issues as stated in the draft PR:

Looking at the test failures unfortunately this approach doesn't work for shared files. The parent ETag change depends on the etag of all mountpoints there so unless the file etag itself changes there is no way to propagate the metadata change to the parents. :/

I don't see a different way other than https://github.com/nextcloud/server/issues/8477