mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-02-09 08:07:47 +01:00
Fix regex to delete all files it should
This commit is contained in:
@@ -1725,7 +1725,7 @@ class AdminController extends AdminBaseController
|
||||
|
||||
// Remove Extra Files
|
||||
foreach (scandir($page->path()) as $file) {
|
||||
if (preg_match("/{$fileParts['filename']}@\d+x\.{$fileParts['extension']}$|{$filename}.meta.yaml$/", $file)) {
|
||||
if (preg_match("/{$fileParts['filename']}@\d+x\.{$fileParts['extension']}(?:\.meta\.yaml)?$|{$filename}\.meta\.yaml$/", $file)) {
|
||||
$result = unlink($page->path() . '/' . $file);
|
||||
|
||||
if (!$result) {
|
||||
|
||||
Reference in New Issue
Block a user