mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 03:16:11 +01:00
making it worse!
This commit is contained in:
@@ -198,7 +198,7 @@ class AdminController
|
||||
if ($filename) {
|
||||
$targetPath = $page->path().'/'.$filename;
|
||||
|
||||
if (unlink($targetPath)) {
|
||||
if (file_exists($targetPath) && unlink($targetPath)) {
|
||||
$this->admin->json_response = ['success', 'File deleted: '.$filename];
|
||||
} else {
|
||||
$this->admin->json_response = ['error', 'File could not be deleted: '.$filename];
|
||||
|
||||
Reference in New Issue
Block a user