Skip to content

Commit

Permalink
Merge pull request #3773 from nextcloud/backport/3448/stable28
Browse files Browse the repository at this point in the history
[stable28] fix: Run move in lock scope of the user
  • Loading branch information
juliushaertl committed Jun 18, 2024
2 parents 6c4eddc + 847bd7d commit f59b24d
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 @@ -652,7 +652,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 f59b24d

Please sign in to comment.