Fixed media delete for streams

This commit is contained in:
Matias Griese
2018-05-23 13:01:58 +03:00
parent d07d07e30f
commit 2352ba6c7c

View File

@@ -1768,7 +1768,13 @@ class AdminController extends AdminBaseController
return false;
}
/** @var UniformResourceLocator $locator */
$locator = $this->grav['locator'];
$targetPath = $media->path() . '/' . $filename;
if ($locator->isStream($targetPath)) {
$targetPath = $locator->findResource($targetPath, true, true);
}
$fileParts = pathinfo($filename);
$found = false;