From edd38e59481a98c56645a43ca6c9048fe1458d20 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Mon, 23 Sep 2013 10:26:46 +0200 Subject: fix previews in shared folders --- apps/files/lib/helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/files') diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php index 08c807d7f7b..1d431df04f1 100644 --- a/apps/files/lib/helper.php +++ b/apps/files/lib/helper.php @@ -39,8 +39,8 @@ class Helper } if($file['isPreviewAvailable']) { - $relativePath = substr($file['path'], 6); - return \OC_Helper::previewIcon($relativePath); + $pathForPreview = $file['directory'] . '/' . $file['name']; + return \OC_Helper::previewIcon($pathForPreview); } return \OC_Helper::mimetypeIcon($file['mimetype']); } -- cgit v1.2.3