nextcloud / files_lock

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

fix: Only update lock timeout when it is not infinite #288

Closed juliushaertl closed 5 months ago

juliushaertl commented 5 months ago

Otherwise if the desktop client tries to refresh an infinite lock it will auto expire on the next check as it will be set to 1 second (0 - (-1) - 0)

Jerome-Herbinet commented 5 months ago

Hi @juliushaertl, Can you describe a buggy behavior which will be fixed by your PR and how (in order, for me, to understand well) ? Thanks

juliushaertl commented 5 months ago

When using open locally the desktop client will lock the file and send another lock request to extend once it is opened. This lead to the lock disappearing almost immediately after opening locally.

juliushaertl commented 5 months ago

/backport to stable29

juliushaertl commented 5 months ago

/backport to stable28

backportbot[bot] commented 5 months ago

The backport to stable29 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable29
git pull origin stable29

# Create the new backport branch
git checkout -b backport/288/stable29

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick c5ec9cbe

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/288/stable29

Error: Failed to clone repository: Failed to checkout branches: error: pathspec 'stable29' did not match any file(s) known to git


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

juliushaertl commented 5 months ago

/backport to stable27

Jerome-Herbinet commented 5 months ago

When using open locally the desktop client will lock the file and send another lock request to extend once it is opened. This lead to the lock disappearing almost immediately after opening locally.

OK thanks