aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer.c14
2 files changed, 8 insertions, 12 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 2676296f12..146ee4f73b 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-20 Iain Holmes <iain@ximian.com>
+
+ * e-msg-composer.c (get_file_content): Open the file with O_CREAT so
+ that if it doesn't exist, it's created. Never return a NULL as this
+ could potentially crash on Solaris.
+
2001-09-18 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer.c (build_message): Attach an X-Evolution-Format
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 4135164ed2..860e1dc1a7 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -666,17 +666,7 @@ get_file_content (const gchar *file_name, gboolean convert, guint flags)
char *raw;
char *html;
- fd = open (file_name, O_RDONLY);
- if (fd == -1) {
- char *msg;
-
- msg = g_strdup_printf (_("Could not open file %s:\n"
- "%s"), file_name, g_strerror (errno));
-
- gnome_error_dialog (msg);
- g_free (msg);
- return NULL;
- }
+ fd = open (file_name, O_RDONLY | O_CREAT, 0775);
raw = read_file_content (fd);
@@ -689,7 +679,7 @@ get_file_content (const gchar *file_name, gboolean convert, guint flags)
gnome_error_dialog (msg);
g_free (msg);
close (fd);
- return NULL;
+ return g_strdup ("");
}
close (fd);