Fix crash upon removing edit locally file provider jobs in edit locally manager

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-05-29 00:37:23 +08:00
parent 8147e831c8
commit 27bc838c9c
No known key found for this signature in database
GPG key ID: C839200C384636B0

View file

@ -152,7 +152,7 @@ void EditLocallyManager::editLocallyFileProvider(const AccountStatePtr &accountS
qCDebug(lcEditLocallyManager) << "Starting to edit file locally with file provider" << relPath
<< "with token" << token;
const auto removeJob = [this, token] { _editLocallyFpJobs.remove(token); };
const auto removeJob = [&] { _editLocallyFpJobs.remove(token); };
const auto tryStandardJob = [this, accountState, relPath, token, removeJob] {
removeJob();
editLocally(accountState, relPath, token);