Skip to content

Commit

Permalink
Merge pull request #3340 from nextcloud/backport/3330/stable27
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl authored Dec 5, 2023
2 parents 3c958a7 + 565180e commit ebc6c4e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Controller/WopiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,8 @@ public function getFile($fileId,
$file = $this->getFileForWopiToken($wopi);
\OC_User::setIncognitoMode(true);
if ($version !== '0') {
$userFolder = $this->rootFolder->getUserFolder($wopi->getOwnerUid());
$versionManager = \OC::$server->get(IVersionManager::class);
$info = $versionManager->getVersionFile($userFolder->getOwner(), $file, $version);
$info = $versionManager->getVersionFile($this->userManager->get($wopi->getUserForFileAccess()), $file, $version);
if ($info->getSize() === 0) {
$response = new Http\Response();
} else {
Expand Down

0 comments on commit ebc6c4e

Please sign in to comment.