summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Preview')
-rw-r--r--lib/private/Preview/GeneratorHelper.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/Preview/GeneratorHelper.php b/lib/private/Preview/GeneratorHelper.php
index 282c46a2a5d..6535fde058b 100644
--- a/lib/private/Preview/GeneratorHelper.php
+++ b/lib/private/Preview/GeneratorHelper.php
@@ -60,7 +60,8 @@ class GeneratorHelper {
* This is required to create the old view and path
*/
private function getViewAndPath(File $file) {
- $owner = $file->getOwner()->getUID();
+ $absPath = ltrim($file->getPath(), '/');
+ $owner = explode('/', $absPath)[0];
$userFolder = $this->rootFolder->getUserFolder($owner)->getParent();