Skip to content

Commit

Permalink
Merge pull request #3772 from nextcloud/backport/3448/stable29
Browse files Browse the repository at this point in the history
[stable29] fix: Run move in lock scope of the user
  • Loading branch information
juliusknorr authored Jun 18, 2024
2 parents a90a4d7 + 20a9e59 commit e46ef63
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 @@ -628,7 +628,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 e46ef63

Please sign in to comment.