mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 12:19:03 +03:00
Lock file when editing locally
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
d02e2f4417
commit
ff6ab38826
1 changed files with 2 additions and 1 deletions
|
@ -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
|
// 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
|
// 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.
|
// 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));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(localFilePath));
|
||||||
Systray::instance()->destroyEditFileLocallyLoadingDialog();
|
Systray::instance()->destroyEditFileLocallyLoadingDialog();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue