aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog2
-rw-r--r--mail/mail-display.c12
2 files changed, 10 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 0af15f4cd8..d6791e76c1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -2,6 +2,8 @@
* mail-display.c (do_attachment_header): Don't display a
down-arrow if the attachment is undisplayable. Fixes bug #6919.
+ (launch_cb): Some programs are buggy when it comes to parsing
+ file: uris, so make sure we do file://%s. Fixes bug #20456.
2002-02-14 Jeffrey Stedfast <fejj@ximian.com>
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 98f083d1f1..bc74557618 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -307,8 +307,7 @@ launch_cb (GtkWidget *widget, gpointer user_data)
tmpdir = e_mkdtemp ("evolution.XXXXXX");
if (!tmpdir) {
- char *msg = g_strdup_printf (_("Could not create temporary "
- "directory: %s"),
+ char *msg = g_strdup_printf (_("Could not create temporary directory: %s"),
g_strerror (errno));
gnome_error_dialog (msg);
g_free (msg);
@@ -318,16 +317,21 @@ launch_cb (GtkWidget *widget, gpointer user_data)
filename = make_safe_filename (tmpdir, part);
if (!write_data_to_file (part, filename, TRUE)) {
+ char *msg = g_strdup_printf (_("Could not create temporary file '%s': %s"),
+ filename, g_strerror (errno));
+ gnome_error_dialog (msg);
g_free (filename);
+ g_free (msg);
return;
}
command = g_strdup_printf ("%s %s%s &", app->command,
- app->expects_uris == GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS ? "file:" : "",
+ app->expects_uris == GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS ? "file://" : "",
filename);
+ g_free (filename);
+
system (command);
g_free (command);
- g_free (filename);
}
static void