more sync with 0.7.6cvs13
authorPaul Mangan <paul@claws-mail.org>
Thu, 23 May 2002 07:08:55 +0000 (07:08 +0000)
committerPaul Mangan <paul@claws-mail.org>
Thu, 23 May 2002 07:08:55 +0000 (07:08 +0000)
ChangeLog.claws
configure.in
src/compose.c

index a94e1d2d2b724fe4e9e43e95116a8985b526c800..e8912099240138e1838f392ff1140b3183dacb81 100644 (file)
@@ -1,3 +1,9 @@
+2002-05-23 [paul]      0.7.6claws12
+
+       * more sync with 0.7.6cvs13
+         src/compose.c
+               see ChangeLog 2002-05-22
+
 2002-05-22 [paul]      0.7.6claws11
 
        * sync with 0.7.6cvs13
index e5acc4daa3bc9968b151f64cdf38121e3f421ce0..de5101ddc43e7debcb15d69802a7c163be99fca2 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=7
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws11
+EXTRA_VERSION=claws12
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 53da4c9838a3a1e23121a4005a86eaaed7a151d0..e8ec3541f481c9312662dbf82bd267feb2936b0a 100644 (file)
@@ -2996,18 +2996,25 @@ static gint compose_bounce_write_to_file(Compose *compose, const gchar *file)
 
        compose_bounce_write_headers(compose, fdest);
 
-       while ((len = fread(buf, sizeof(gchar), BUFFSIZE, fp)) > 0) {
-               if (fwrite(buf, sizeof(gchar), len, fdest) == -1)
+       while ((len = fread(buf, sizeof(gchar), sizeof(buf), fp)) > 0) {
+               if (fwrite(buf, sizeof(gchar), len, fdest) != len) {
+                       FILE_OP_ERROR(file, "fwrite");
                        goto error;
+               }
        }
 
-       fclose(fdest);
        fclose(fp);
+       if (fclose(fdest) == EOF) {
+               FILE_OP_ERROR(file, "fclose");
+               unlink(file);
+               return -1;
+       }
 
        return 0;
  error:
-       fclose(fdest);
        fclose(fp);
+       fclose(fdest);
+       unlink(file);
 
        return -1;
 }