Fixed removing file from local media

This commit is contained in:
Matias Griese
2022-06-08 19:10:26 +03:00
parent 34915d96a3
commit 8c2c8d3f15

View File

@@ -307,7 +307,7 @@ abstract class LocalMedia extends AbstractMedia
protected function doRemove(string $filename): void
{
$filepath = $this->getRealPath($filename);
if ($this->fileExists($filepath)) {
if (is_file($filepath)) {
$result = unlink($filepath);
if (!$result) {
throw new RuntimeException($filename, 500);