Implement safe_fclose() so we can respect the "Metadata handling"
[claws.git] / src / addrbook.c
index 274d4ac4431ea217c161d107ff8f1a7ff83b85d4..c519eb7142cc547d47726b5382d34a47a54d9db4 100644 (file)
@@ -33,6 +33,7 @@
 #include "addrcache.h"
 #include "addrbook.h"
 #include "adbookbase.h"
+#include "safe_fclose.h"
 
 #ifndef DEV_STANDALONE
 #include "prefs_gtk.h"
@@ -1318,7 +1319,7 @@ static gint addrbook_write_to(AddressBookFile *book, gchar *newFile)
 
                book->retVal = MGU_SUCCESS;
 #ifdef DEV_STANDALONE
-               fclose(fp);
+               safe_fclose(fp);
 #else
                if (prefs_file_close( pfile ) < 0)
                        book->retVal = MGU_ERROR_WRITE;