Edit locally. Do not lock if locking is disabled on the server.

Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
alex-z 2023-01-26 17:00:14 +01:00
parent aa74448f75
commit bb8bdab19c

View file

@ -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();