diff options
Diffstat (limited to 'src/components.c')
-rw-r--r-- | src/components.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components.c b/src/components.c index f3d79d1..4d2afbd 100644 --- a/src/components.c +++ b/src/components.c @@ -156,12 +156,12 @@ image_new(char *src, const struct stat *pstat, struct album *album) size_t relstart = album->slug - album->url; image->url = joinpath(album->url, noext); image->url_image = joinpath(image->url, image->basename); - image->url_thumb = malloc(strlen(image->url) + strlen(PHOTO_THUMB_SUFFIX) + + image->url_thumb = malloc(strlen(image->url) + strlen(THUMB_SUFFIX) + strlen(image->basename) + 2); image->dst = image->url + relstart; image->dst_image = image->url_image + relstart; image->dst_thumb = image->url_thumb + relstart; - sprintf(image->url_thumb, "%s/%s" PHOTO_THUMB_SUFFIX "%s", image->url, + sprintf(image->url_thumb, "%s/%s" THUMB_SUFFIX "%s", image->url, noext, image->ext); image->exif_data = exif_data_new_from_file(image->source); |