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.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/models/mfile.php b/application/models/mfile.php
index eef37c4b3..c9827b6fd 100644
--- a/application/models/mfile.php
+++ b/application/models/mfile.php
@@ -240,7 +240,9 @@ class Mfile extends CI_Model {
if ($filedata !== false) {
assert(isset($filedata["hash"]));
if ($this->unused_file($filedata['hash'])) {
- unlink($this->file($filedata['hash']));
+ if (file_exists($this->file($filedata['hash']))) {
+ unlink($this->file($filedata['hash']));
+ }
$dir = $this->folder($filedata['hash']);
if (count(scandir($dir)) == 2) {
rmdir($dir);