Fixed email attachments with "thumbnail size = 0"

SVN revision: 2489
This commit is contained in:
Stefan Ritt 2013-05-03 11:31:42 +00:00
parent f0bb2a8628
commit 8c8806077b

View File

@ -21313,9 +21313,10 @@ void format_email_attachments(LOGBOOK * lbs, int message_id, int attachment_type
/* encode file */
strlcpy(file_name, lbs->data_dir, sizeof(file_name));
strlcat(file_name, att_file[index], sizeof(file_name));
if (is_image(file_name) && image_magick_exist) {
if (is_image(file_name)) {
get_thumb_name(file_name, str, sizeof(str), 0);
strlcpy(file_name, str, sizeof(file_name));
if (str[0])
strlcpy(file_name, str, sizeof(file_name));
}
fh = open(file_name, O_RDONLY | O_BINARY);