Permalink
Browse files

Folder check before removal

Check for directory existence before removing it.
  • Loading branch information...
1 parent ff93199 commit 03b2fb21314b9492f3e4101ab6c482c8a5891793 @srs81 committed Oct 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Controller/Component/UploadComponent.php
@@ -23,7 +23,7 @@ public function deleteAll ($model, $id) {
foreach ($files as $file) {
unlink($file);
}
- rmdir($dirPath);
+ if (is_dir($dirPath)) rmdir($dirPath);
}
// The "last mile" of the directory path for where the files get uploaded

0 comments on commit 03b2fb2

Please sign in to comment.