2006-02-13 [colin] 2.0.0cvs48
authorColin Leroy <colin@colino.net>
Mon, 13 Feb 2006 17:57:51 +0000 (17:57 +0000)
committerColin Leroy <colin@colino.net>
Mon, 13 Feb 2006 17:57:51 +0000 (17:57 +0000)
* src/procmime.c
Add missing fclose()s on error
* src/textview.c
Remove unused code
* src/common/utils.c
Fix temp files not being deleted on windows
Patches by Thomas Gilgin

ChangeLog
PATCHSETS
configure.ac
src/common/utils.c
src/procmime.c
src/textview.c

index d87aa72b2a39d7e1d3860810a012521c470eb611..426cfb165d01867b944c999d3e4c028d933ebe3a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-02-13 [colin]     2.0.0cvs48
+
+       * src/procmime.c
+               Add missing fclose()s on error
+       * src/textview.c
+               Remove unused code
+       * src/common/utils.c
+               Fix temp files not being deleted on windows
+       Patches by Thomas Gilgin
+
 2006-02-13 [cleroy]    2.0.0cvs47
 
        * src/mainwindow.c
index f9f81cdd11b747bce23dcc624f6523ba333a233b..be157b6d9d81bc4934d16304e1989fea467d0833 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.88 -r 1.207.2.89 src/folderview.c;  cvs diff -u -r 1.115.2.74 -r 1.115.2.75 src/main.c;  cvs diff -u -r 1.274.2.95 -r 1.274.2.96 src/mainwindow.c;  ) > 2.0.0cvs45.patchset
 ( cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/plugins/pgpcore/prefs_gpg.c;  ) > 2.0.0cvs46.patchset
 ( cvs diff -u -r 1.274.2.96 -r 1.274.2.97 src/mainwindow.c;  ) > 2.0.0cvs47.patchset
+( cvs diff -u -r 1.49.2.72 -r 1.49.2.73 src/procmime.c;  cvs diff -u -r 1.96.2.95 -r 1.96.2.96 src/textview.c;  cvs diff -u -r 1.36.2.55 -r 1.36.2.56 src/common/utils.c;  ) > 2.0.0cvs48.patchset
index 7a666a62d0a5709720716d02f66fd4bd64198565..b7bf1fe73d127ab61e59e80c9e6bcd52e1192730 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=47
+EXTRA_VERSION=48
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 70383d53edcd343c10ae39b54171383d72fa1ec5..3863372c1ad6cfc9272c17cec970a1dc7e737cf8 100644 (file)
@@ -174,8 +174,8 @@ gint mkstemp_name(const gchar *template, gchar **name_used)
        int tmpfd;
 
        *name_used = g_strdup_printf("%s.%ld",_mktemp(template),count++);
-       tmpfd = open (*name_used, (O_CREAT | O_RDWR | O_BINARY
-                                    | S_IREAD | S_IWRITE));
+       tmpfd = open (*name_used, (O_CREAT | O_RDWR | O_BINARY),
+                                    (S_IRUSR | S_IWUSR));
 
        tempfiles=g_slist_append(tempfiles, g_strdup(*name_used));
        if (tmpfd<0) {
index b4ccf07bb9c475788e8fc3f23da0a56c511ed929..767356baba15f399d0465f5808bb3552dc4742d7 100644 (file)
@@ -301,6 +301,7 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
        outfp = get_tmpfile_in_dir(get_mime_tmp_dir(), &tmpfilename);
        if (!outfp) {
                perror("tmpfile");
+               fclose(infp);
                return FALSE;
        }
        tmp_file = TRUE;
@@ -327,6 +328,7 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
                        if (!tmpfp) {
                                perror("tmpfile");
                                if (tmp_file) fclose(outfp);
+                               fclose(infp);
                                return FALSE;
                        }
                }
index d3b9541cdf5f11c0885eb3a7171c31311af4092d..722fcb53e635ffd519d62a984796ffcae21539df 100644 (file)
@@ -581,10 +581,6 @@ static void textview_add_part(TextView *textview, MimeInfo *mimeinfo)
                        gchar *filename;
                        RemoteURI *uri;
                        gchar *uri_str;
-                       FILE *fp;
-
-                       fp = g_fopen(mimeinfo->data.filename, "rb");
-                       fseek(fp, mimeinfo->offset, SEEK_SET);
 
                        filename = procmime_get_tmp_file_name(mimeinfo);
                        if (procmime_get_part(filename, mimeinfo) < 0) {