Skip to content

Commit

Permalink
fix: Run file renaming in lock scope of the user
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr authored and backportbot[bot] committed Jun 18, 2024
1 parent ed15c14 commit 27c33ae
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 27c33ae

Please sign in to comment.