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:
parent
7db69a1d02
commit
bf1247e197
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue