making it worse!

This commit is contained in:
Andy Miller
2014-09-22 22:38:17 -06:00
parent b22618b3a2
commit 0b69ed4c7e
4 changed files with 18 additions and 16 deletions

View File

@@ -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];