From: Claudio Cambra Date: Mon, 28 Nov 2022 17:29:37 +0000 (+0100) Subject: Lock file when editing locally X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~88^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ff6ab388267c275a6b21a174d61fc37e7175d3d5;p=nextcloud-desktop.git Lock file when editing locally Signed-off-by: Claudio Cambra --- diff --git a/src/gui/editlocallyjob.cpp b/src/gui/editlocallyjob.cpp index 93ca47628..67c8cbdc0 100644 --- a/src/gui/editlocallyjob.cpp +++ b/src/gui/editlocallyjob.cpp @@ -546,7 +546,8 @@ void EditLocallyJob::openFile() // In case the VFS mode is enabled and a file is not yet hydrated, we must call QDesktopServices::openUrl // from a separate thread, or, there will be a freeze. To avoid searching for a specific folder and checking // if the VFS is enabled - we just always call it from a separate thread. - QtConcurrent::run([localFilePath]() { + QtConcurrent::run([localFilePath, this]() { + _accountState->account()->setLockFileState(_relPath, _folderForFile->journalDb(), SyncFileItem::LockStatus::LockedItem); QDesktopServices::openUrl(QUrl::fromLocalFile(localFilePath)); Systray::instance()->destroyEditFileLocallyLoadingDialog(); });