diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-11-20 05:22:12 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-11-20 05:22:12 +0800 |
commit | dc497cb36bd6b3b00752195bfc6cfebfb11a1a7a (patch) | |
tree | 18179a15653a7d8ad2993682facd7767970e8c3d /mail/em-utils.c | |
parent | 23a30c833da72e2ab2b1287b5a7101e9a7aadc8f (diff) | |
download | gsoc2013-evolution-dc497cb36bd6b3b00752195bfc6cfebfb11a1a7a.tar.gz gsoc2013-evolution-dc497cb36bd6b3b00752195bfc6cfebfb11a1a7a.tar.zst gsoc2013-evolution-dc497cb36bd6b3b00752195bfc6cfebfb11a1a7a.zip |
Same.
2003-11-19 Jeffrey Stedfast <fejj@ximian.com>
* em-utils.c (em_utils_selection_set_urilist): Same.
* em-format-html-display.c (efhd_drag_data_get): Same as below.
* em-folder-tree.c (drag_text_uri_list): Terminate each url of a
text/uri-list with a \r\n.
svn path=/trunk/; revision=23451
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r-- | mail/em-utils.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c index ab5c86c131..0519fe02a5 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -1837,7 +1837,7 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr { const char *tmpdir; CamelStream *fstream; - char *uri; + char *uri, *p; int fd; tmpdir = e_mkdtemp("drag-n-drop-XXXXXX"); @@ -1847,16 +1847,19 @@ em_utils_selection_set_urilist(GtkSelectionData *data, CamelFolder *folder, GPtr /* FIXME: this used to save a single message with the subject as the filename but it was unsafe, and makes this messier, the pain */ - - uri = alloca(strlen(tmpdir)+16); - sprintf(uri, "file:///%s/mbox", tmpdir); + + p = uri = g_alloca (strlen (tmpdir) + 16); + p += sprintf (uri, "file:///%s/mbox", tmpdir); fd = open(uri + 7, O_WRONLY | O_CREAT | O_EXCL, 0666); if (fd == -1) return; - + fstream = camel_stream_fs_new_with_fd(fd); if (fstream) { + /* terminate with \r\n to be compliant with the spec */ + strcpy (p, "\r\n"); + if (em_utils_write_messages_to_stream(folder, uids, fstream) == 0) gtk_selection_data_set(data, data->target, 8, uri, strlen(uri)); |