aboutsummaryrefslogtreecommitdiff
path: root/src/components.c
diff options
context:
space:
mode:
authorYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-11-28 04:37:59 +0300
committerYaroslav de la Peña Smirnov <yps@yaroslavps.com>2021-11-28 04:37:59 +0300
commit7b0eaa806f2cfc84e4c26f8f608e1d4e4843ea05 (patch)
treefd7ca9abad667e43c75aa09580dd145448ff72a5 /src/components.c
parente2a71b0366aa80a7cf131fdbde6012671493d364 (diff)
downloadrevela-7b0eaa806f2cfc84e4c26f8f608e1d4e4843ea05.tar.gz
revela-7b0eaa806f2cfc84e4c26f8f608e1d4e4843ea05.zip
Clean out old files/dirs
Delete extraneous files/images/albums that are no longer present in the source directory.
Diffstat (limited to 'src/components.c')
-rw-r--r--src/components.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/components.c b/src/components.c
index 8937a83..2e3bc5e 100644
--- a/src/components.c
+++ b/src/components.c
@@ -199,6 +199,7 @@ album_new(struct album_config *conf, struct site_config *sconf, const char *src,
album->slug = slugify(rsrc, sconf->base_url, &album->url);
album->images = bstree_new(image_cmp, image_destroy);
album->tstamp = MAXTIME;
+ album->image_dirs = hashmap_new();
album->map = hashmap_new_with_cap(16);
album->thumbs = vector_new(128);
album->previews = vector_new(sconf->max_previews);
@@ -241,6 +242,7 @@ album_destroy(void *data)
free(album->source);
free(album->url);
bstree_destroy(album->images);
+ hashmap_free(album->image_dirs);
hashmap_free(album->map);
vector_free(album->thumbs);
vector_free(album->previews);