Implement safe_fclose() so we can respect the "Metadata handling"
[claws.git] / src / addrindex.c
index 80129968e87c5b1636287244f2c164a17421058c..fda0bcd62286f4ea7475854837dbb4ea090f1041 100644 (file)
@@ -43,6 +43,7 @@
 #include "utils.h"
 #include "alertpanel.h"
 #include "passwordstore.h"
+#include "safe_fclose.h"
 
 #ifndef DEV_STANDALONE
 #include "prefs_gtk.h"
@@ -1782,7 +1783,7 @@ static gint addrindex_write_to( AddressIndex *addrIndex, const gchar *newFile )
 
                addrIndex->retVal = MGU_SUCCESS;
 #ifdef DEV_STANDALONE
-               fclose( fp );
+               safe_fclose( fp );
 #else
                if( prefs_file_close( pfile ) < 0 ) {
                        addrIndex->retVal = MGU_ERROR_WRITE;