Merge pull request #16095 from nextcloud/bugfix/theming-filetypes

Only return link to themed icon if file exists
This commit is contained in:
Jan-Christoph Borchardt 2019-06-26 14:58:43 +02:00 committed by GitHub
commit 810e5f4864
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ class ThemingDefaults extends \OC_Defaults {
} catch (AppPathNotFoundException $e) {}
return $this->urlGenerator->linkToRoute('theming.Theming.getManifest') . '?v=' . $cacheBusterValue;
}
if (strpos($image, 'filetypes/') === 0) {
if (strpos($image, 'filetypes/') === 0 && file_exists(\OC::$SERVERROOT . '/core/img/' . $image )) {
return $this->urlGenerator->linkToRoute('theming.Icon.getThemedIcon', ['app' => $app, 'image' => $image]);
}
return false;