summaryrefslogtreecommitdiffstats
path: root/application
diff options
context:
space:
mode:
Diffstat (limited to 'application')
-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);