if (strlen(sigfile) < 2)
return;
- sigprg = popen(sigfile+1, "r");
+ sigprg = popen(sigfile+1, "rb");
if (sigprg) {
buf = g_malloc(buf_len);
g_return_if_fail(file != NULL);
- if ((fp = fopen(file, "r")) == NULL) {
+ if ((fp = fopen(file, "rb")) == NULL) {
FILE_OP_ERROR(file, "fopen");
return;
}
alertpanel_notice(_("File %s is empty."), file);
return;
}
- if ((fp = fopen(file, "r")) == NULL) {
+ if ((fp = fopen(file, "rb")) == NULL) {
alertpanel_error(_("Can't read %s."), file);
return;
}
size_t len;
gchar buf[BUFFSIZE];
- if ((fp = fopen(compose->bounce_filename, "r")) == NULL) {
+ if ((fp = fopen(compose->bounce_filename, "rb")) == NULL) {
FILE_OP_ERROR(file, "fopen");
return -1;
}
- if ((fdest = fopen(file, "w")) == NULL) {
+ if ((fdest = fopen(file, "wb")) == NULL) {
FILE_OP_ERROR(file, "fopen");
fclose(fp);
return -1;
const gchar *out_codeset;
EncodingType encoding;
- if ((fp = fopen(file, "w")) == NULL) {
+ if ((fp = fopen(file, "wb")) == NULL) {
FILE_OP_ERROR(file, "fopen");
return -1;
}
size_t len;
gchar *chars;
- if ((fp = fopen(file, "w")) == NULL) {
+ if ((fp = fopen(file, "wb")) == NULL) {
FILE_OP_ERROR(file, "fopen");
return -1;
}
/* add queue header */
tmp = g_strdup_printf("%s%cqueue.%d", g_get_tmp_dir(),
- G_DIR_SEPARATOR, (gint)compose);
- if ((fp = fopen(tmp, "w")) == NULL) {
+ G_DIR_SEPARATOR, (gint)compose);
+ if ((fp = fopen(tmp, "wb")) == NULL) {
FILE_OP_ERROR(tmp, "fopen");
g_free(tmp);
return -1;
}
- if ((src_fp = fopen(tmp2, "r")) == NULL) {
+ if ((src_fp = fopen(tmp2, "rb")) == NULL) {
FILE_OP_ERROR(tmp2, "fopen");
fclose(fp);
unlink(tmp);
gchar buf[BUFFSIZE];
gchar inbuf[B64_LINE_SIZE], outbuf[B64_BUFFSIZE];
- if ((attach_fp = fopen(ainfo->file, "r")) == NULL) {
+ if ((attach_fp = fopen(ainfo->file, "rb")) == NULL) {
g_warning(_("Can't open file %s\n"), ainfo->file);
continue;
}