diff options
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/helper.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php index 58d0886a636..7d8906e2251 100644 --- a/apps/files/lib/helper.php +++ b/apps/files/lib/helper.php @@ -37,18 +37,10 @@ class Helper public static function determineIcon($file) { if($file['type'] === 'dir') { $icon = \OC_Helper::mimetypeIcon('dir'); - $absPath = $file->getPath(); - $mount = \OC\Files\Filesystem::getMountManager()->find($absPath); - if (!is_null($mount)) { - $sid = $mount->getStorageId(); - if (!is_null($sid)) { - $sid = explode(':', $sid); - if ($sid[0] === 'shared') { - $icon = \OC_Helper::mimetypeIcon('dir-shared'); - } elseif ($sid[0] !== 'local' and $sid[0] !== 'home') { - $icon = \OC_Helper::mimetypeIcon('dir-external'); - } - } + if ($file->isShared()) { + $icon = \OC_Helper::mimetypeIcon('dir-shared'); + } elseif ($file->isMounted()) { + $icon = \OC_Helper::mimetypeIcon('dir-external'); } }else{ $icon = \OC_Helper::mimetypeIcon($file->getMimetype()); |