summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-11-08 18:18:29 +0100
committerFlorian Pritz <bluewind@xinu.at>2014-11-08 18:18:29 +0100
commit476cfd42a72bcd3fb3ee0063d052163447c477f8 (patch)
tree10ed39e85bed23d157b76144542dc27986bb37c3 /application
parent3d433d5e79231d87eda2f5642e03639f89dad9fa (diff)
mfile->delete_id: Forgive if a dir doesn't exist
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application')
-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);
+ }
}
}
}