fall back to absolute path for pipelined assets (#14940)

If the asset is, for example, in an apps directory that is
outside the $SERVERROOT, we won't be able to get a relative
path. We shouldn't just fail hard in this case. Fall back to
using the absolute path instead (as we used to).
This commit is contained in:
Adam Williamson 2015-03-16 19:06:06 -07:00
parent fc0aa0b6ae
commit fa1be7d296
1 changed files with 5 additions and 1 deletions

View File

@ -242,7 +242,11 @@ class OC_TemplateLayout extends OC_Template {
private static function hashFileNames($files) {
foreach($files as $i => $file) {
try {
$files[$i] = self::convertToRelativePath($file[0]).'/'.$file[2];
} catch (\Exception $e) {
$files[$i] = $file[0].'/'.$file[2];
}
}
sort($files);