Only return link to themed icon if file exists
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
bc276cdd83
commit
ec6ce43053
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue