summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/models/item.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/models/item.php b/core/models/item.php
index 211459b9..0f6e16e8 100644
--- a/core/models/item.php
+++ b/core/models/item.php
@@ -40,11 +40,12 @@ class Item_Model extends ORM_MPTT {
}
public function delete() {
+ $path = $this->file_path();
parent::delete();
if ($this->is_album()) {
- directory::unlink($this->file_path());
+ dir::unlink($path);
} else {
- unlink($this->file_path());
+ unlink($path);
}
}