2007-10-08 [paul] 3.0.2cvs35
authorPaul Mangan <paul@claws-mail.org>
Mon, 8 Oct 2007 13:19:20 +0000 (13:19 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 8 Oct 2007 13:19:20 +0000 (13:19 +0000)
* src/mimeview.c
Save users from themselves: save temporary
files used for Open/Open with as read-only.
Thanks to Colin

ChangeLog
PATCHSETS
configure.ac
src/mimeview.c

index 1cc4855..e7c7c8f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-08 [paul]      3.0.2cvs35
+
+       * src/mimeview.c
+               Save users from themselves: save temporary
+               files used for Open/Open with as read-only.
+               Thanks to Colin
+
 2007-10-08 [paul]      3.0.2cvs34
 
        * tools/Makefile.am
index 80a3bdd..8fa3e32 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.3.2.50 -r 1.3.2.51 src/prefs_themes.c;  cvs diff -u -r 1.25.2.47 -r 1.25.2.48 src/stock_pixmap.c;  ) > 3.0.2cvs32.patchset
 ( cvs diff -u -r 1.2.2.11 -r 1.2.2.12 tools/kdeservicemenu/README;  diff -u /dev/null tools/kdeservicemenu/claws-mail-attach-files.desktop.template;  cvs diff -u -r 1.2.2.5 -r 1.2.2.6 tools/kdeservicemenu/install.sh;  cvs diff -u -r -1.1.2.2 -r -1.1.2.3 tools/kdeservicemenu/template_claws-mail-attach-files.desktop;  ) > 3.0.2cvs33.patchset
 ( cvs diff -u -r 1.25.2.22 -r 1.25.2.23 tools/Makefile.am;  ) > 3.0.2cvs34.patchset
+( cvs diff -u -r 1.83.2.117 -r 1.83.2.118 src/mimeview.c;  ) > 3.0.2cvs35.patchset
index 179e3ef..4300a18 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=34
+EXTRA_VERSION=35
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 0bbfb36..854b81f 100644 (file)
@@ -1899,14 +1899,17 @@ static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
                mimeview_open_part_with(mimeview, partinfo, TRUE);
        else {
                if ((p = strchr(cmd, '%')) && *(p + 1) == 's' &&
-                   !strchr(p + 2, '%'))
+                   !strchr(p + 2, '%')) {
                        g_snprintf(buf, sizeof(buf), cmd, filename);
-               else {
+                       g_chmod(filename, S_IRUSR);
+               } else {
                        g_warning("MIME viewer command line is invalid: '%s'", cmd);
                        mimeview_open_part_with(mimeview, partinfo, FALSE);
                }
-               if (execute_command_line(buf, TRUE) != 0)
+               if (execute_command_line(buf, TRUE) != 0) {
+                       g_chmod(filename, S_IRUSR|S_IWUSR);
                        mimeview_open_part_with(mimeview, partinfo, FALSE);
+               }
        }
 }