talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 502efc7b7bce9a2d373cfeb14359b1af92384912
parent 4220a91f1b97f14a36955f170865e504ac3d643e
Author: wwp <subscript@free.fr>
Date:   Thu,  9 Jan 2025 11:28:22 +0100

Fix CID 1491370: unchecked return value.

Diffstat:
Msrc/imap.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/imap.c b/src/imap.c @@ -1916,8 +1916,11 @@ static gint imap_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list, gchar *cache_file = g_strconcat( cache_path, G_DIR_SEPARATOR_S, itos(new_uid), NULL); - copy_file(real_file, cache_file, TRUE); - debug_print("got UID %d, copied to cache: %s\n", new_uid, cache_file); + if (copy_file(real_file, cache_file, TRUE) < 0) { + g_warning("can't copy %s to %s.bak", real_file, cache_file); + } else { + debug_print("got UID %d, copied to cache: %s\n", new_uid, cache_file); + } g_free(cache_file); } g_free(cache_path);