summaryrefslogtreecommitdiff
path: root/core/helpers/album.php
diff options
context:
space:
mode:
Diffstat (limited to 'core/helpers/album.php')
-rw-r--r--core/helpers/album.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/helpers/album.php b/core/helpers/album.php
index 415e654c..021c09f3 100644
--- a/core/helpers/album.php
+++ b/core/helpers/album.php
@@ -47,8 +47,11 @@ class Album_Core {
}
$album = $album->add_to_parent($parent_id);
- mkdir($album->path());
- mkdir($album->thumbnail_path());
+ mkdir($album->file_path());
+ $thumbnail_dir = dirname($album->thumbnail_path());
+ if (!file_exists($thumbnail_dir)) {
+ mkdir($thumbnail_dir);
+ }
return $album;
}
}