Fix issue when searching an asset in CMS backend

On Windows, searching for a file return the paths with the "\" separator, and throws an error when selecting a file for editing.
This commit is contained in:
Nicola Marini 2014-08-13 17:42:51 +02:00
parent 7db69a1d02
commit bf1247e197

View File

@ -640,7 +640,7 @@ class AssetList extends WidgetBase
if ($this->pathMatchesSearch($words, $path)) {
$result[] = (object)[
'type'=>'file',
'path'=>$path,
'path'=>File::normalizePath($path),
'name'=>$item->getFilename(),
'editable'=>in_array(strtolower($item->getExtension()), $editableAssetTypes)
];
@ -664,4 +664,4 @@ class AssetList extends WidgetBase
return true;
}
}
}