Skip to content

Commit

Permalink
Merge pull request #3774 from nextcloud/backport/3448/stable27
Browse files Browse the repository at this point in the history
[stable27] fix: Run move in lock scope of the user
  • Loading branch information
juliusknorr authored Jun 18, 2024
2 parents ed15c14 + 27c33ae commit 7b64e7f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,13 @@ public function postFile(string $fileId, string $access_token): JSONResponse {

// create a unique new file
$path = $this->rootFolder->getNonExistingName($path);
$file = $file->move($path);
$this->lockManager->runInScope(new LockContext(
$this->getFileForWopiToken($wopi),
ILock::TYPE_APP,
Application::APPNAME
), function () use (&$file, $path) {
$file = $file->move($path);
});
} else {
$file = $this->getFileForWopiToken($wopi);

Expand Down

0 comments on commit 7b64e7f

Please sign in to comment.