Stop using pathinfo (fixes #272)

Because it does not handle UTF-8 filenames correctly
This commit is contained in:
Pierre Rudloff 2020-04-09 20:46:14 +02:00
parent 08d61b4bec
commit a478aea3ca

View file

@ -274,14 +274,7 @@ class Video
*/
public function getFileNameWithExtension($extension)
{
return html_entity_decode(
pathinfo(
$this->getFilename(),
PATHINFO_FILENAME
) . '.' . $extension,
ENT_COMPAT,
'ISO-8859-1'
);
return str_replace('.' . $this->ext, '.' . $extension, $this->getFilename());
}
/**