Skip to content

Commit e332929

Browse files
authored
Merge pull request #5371 from nextcloud/bugfix/do-not-lock-if-lock-is-not-available
Edit locally. Do not lock if locking is disabled on the server.
2 parents aa74448 + bb8bdab commit e332929

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/gui/editlocallyjob.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,8 @@ void EditLocallyJob::processLocalItem()
565565
const auto ok = _folderForFile->journalDb()->getFileRecord(_relativePathToRemoteRoot, &rec);
566566
Q_ASSERT(ok);
567567

568-
if (rec.isDirectory()) { // Directories not lock-able
568+
// Do not lock if it is a directory or lock is not available on the server
569+
if (rec.isDirectory() || !_accountState->account()->capabilities().filesLockAvailable()) {
569570
openFile();
570571
} else {
571572
lockFile();

0 commit comments

Comments
 (0)