summaryrefslogtreecommitdiffstats
path: root/application/models/mfile.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/mfile.php')
-rw-r--r--application/models/mfile.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/application/models/mfile.php b/application/models/mfile.php
index c9827b6fd..eee2c4e5b 100644
--- a/application/models/mfile.php
+++ b/application/models/mfile.php
@@ -244,8 +244,10 @@ class Mfile extends CI_Model {
unlink($this->file($filedata['hash']));
}
$dir = $this->folder($filedata['hash']);
- if (count(scandir($dir)) == 2) {
- rmdir($dir);
+ if (file_exists($dir)) {
+ if (count(scandir($dir)) == 2) {
+ rmdir($dir);
+ }
}
}
}