#include "plugin.h"
#include "procmime.h"
#include "utils.h"
+#include "file-utils.h"
#include "tnef_dump.h"
"Claws Mail TNEF parser:\n\n"
"%s\n"), reason?reason:_("Unknown error"));
- fclose(fp);
+ claws_fclose(fp);
if (g_stat(tmpfilename, &statbuf) < 0) {
claws_unlink(tmpfilename);
procmime_mimeinfo_free_all(&sub_info);
}
}
- if (fwrite(data, 1, size, fp) < size) {
- FILE_OP_ERROR(tmpfilename, "fwrite");
- fclose(fp);
+ if (claws_fwrite(data, 1, size, fp) < size) {
+ FILE_OP_ERROR(tmpfilename, "claws_fwrite");
+ claws_fclose(fp);
claws_unlink(tmpfilename);
procmime_mimeinfo_free_all(&sub_info);
return tnef_broken_mimeinfo(_("Failed to write the part data."));
}
- fclose(fp);
+ claws_fclose(fp);
if (g_stat(tmpfilename, &statbuf) < 0) {
claws_unlink(tmpfilename);
result = SaveVCalendar(fp, tnef);
- fclose(fp);
+ claws_fclose(fp);
if (g_stat(tmpfilename, &statbuf) < 0) {
result = FALSE;
result = SaveVTask(fp, tnef);
- fclose(fp);
+ claws_fclose(fp);
if (g_stat(tmpfilename, &statbuf) < 0) {
result = FALSE;
result = SaveVCard(fp, tnef);
- fclose(fp);
+ claws_fclose(fp);
ret = g_stat(tmpfilename, &statbuf);
if (ret == -1) {
if (mimeinfo->content == MIMECONTENT_FILE)
debug_print("content: %s\n", mimeinfo->data.filename);
else
- debug_print("contents in memory (len %zd)\n",
+ debug_print("contents in memory (len %"G_GSIZE_FORMAT")\n",
strlen(mimeinfo->data.mem));
tnef = g_new0(TNEFStruct, 1);