Implement safe_fclose() so we can respect the "Metadata handling"
[claws.git] / src / etpan / imap-thread.c
index 80279d2596c3e81be40f21e343da4ff114bf5c68..29d03802b60cd3a7e5b67ffd6c209e0cdf3a0b11 100644 (file)
@@ -44,6 +44,7 @@
 #include "utils.h"
 #include "mainwindow.h"
 #include "proxy.h"
+#include "safe_fclose.h"
 #include "ssl.h"
 #include "ssl_certificate.h"
 #include "socket.h"
@@ -2637,7 +2638,7 @@ static void fetch_content_run(struct etpan_thread_op * op)
                        goto fclose;
                }
                
-               r = fclose(f);
+               r = safe_fclose(f);
                if (r == EOF) {
                        result->error = MAILIMAP_ERROR_FETCH;
                        goto unlink;