Implement safe_fclose() so we can respect the "Metadata handling"
[claws.git] / src / common / template.c
index 9d53d883ed085f8ebc380e16ac1a1395c5865554..dfd96032f4dd4142c3da0b754915a96bdd8207c5 100644 (file)
@@ -29,6 +29,7 @@
 #include "utils.h"
 #include "template.h"
 #include "codeconv.h"
+#include "safe_fclose.h"
 
 static GSList *template_list;
 
@@ -283,7 +284,7 @@ static void template_write_config(GSList *tmpl_list)
                } else {
                        TRY(fwrite("", sizeof(gchar), 1, fp) == 1);
                }
-               TRY_NO_CLOSE(fclose(fp) != EOF);
+               TRY_NO_CLOSE(safe_fclose(fp) != EOF);
 
                if (new) {
                        if (rename_force(new, filename) < 0) {