From bb8bdab19c488c03264ab8e7eeb8021174a4852a Mon Sep 17 00:00:00 2001 From: alex-z Date: Thu, 26 Jan 2023 17:00:14 +0100 Subject: [PATCH] Edit locally. Do not lock if locking is disabled on the server. Signed-off-by: alex-z --- src/gui/editlocallyjob.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/editlocallyjob.cpp b/src/gui/editlocallyjob.cpp index 7764e0b05..a95ad1375 100644 --- a/src/gui/editlocallyjob.cpp +++ b/src/gui/editlocallyjob.cpp @@ -565,7 +565,8 @@ void EditLocallyJob::processLocalItem() const auto ok = _folderForFile->journalDb()->getFileRecord(_relativePathToRemoteRoot, &rec); Q_ASSERT(ok); - if (rec.isDirectory()) { // Directories not lock-able + // Do not lock if it is a directory or lock is not available on the server + if (rec.isDirectory() || !_accountState->account()->capabilities().filesLockAvailable()) { openFile(); } else { lockFile(); -- 2.30.2