Skip to content

Commit

Permalink
Merge pull request #3339 from nextcloud/backport/3330/stable28
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Dec 5, 2023
2 parents 1fc5053 + 1eca58d commit 0c5d2b2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Controller/WopiController.php
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 0c5d2b2

Please sign in to comment.