From f011eb35d950c2ec743d29ae4c02a40ad9f62aef Mon Sep 17 00:00:00 2001 From: marcus Date: Sun, 31 Jul 2005 18:35:06 +0000 Subject: Fix text drag and drop when the destination is not on the same file system as /tmp. See http://bugzilla.gnome.org/show_bug.cgi?id=312145 for more details. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@4366 df743ca5-7f9a-e211-a948-0013205c9059 --- ...-libnautilus-private_nautilus-file-operations.c | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 x11-fm/nautilus2/files/patch-libnautilus-private_nautilus-file-operations.c (limited to 'x11-fm/nautilus2/files/patch-libnautilus-private_nautilus-file-operations.c') diff --git a/x11-fm/nautilus2/files/patch-libnautilus-private_nautilus-file-operations.c b/x11-fm/nautilus2/files/patch-libnautilus-private_nautilus-file-operations.c new file mode 100644 index 000000000..d80a314d1 --- /dev/null +++ b/x11-fm/nautilus2/files/patch-libnautilus-private_nautilus-file-operations.c @@ -0,0 +1,34 @@ +--- libnautilus-private/nautilus-file-operations.c.orig Sun Jul 31 13:44:00 2005 ++++ libnautilus-private/nautilus-file-operations.c Sun Jul 31 14:23:47 2005 +@@ -2453,12 +2453,21 @@ nautilus_file_operations_new_file (GtkWi + NautilusNewFileCallback done_callback, + gpointer data) + { +- char source_file_str[] = "/tmp/nautilus-sourceXXXXXX"; ++ char *source_file_str; + char *source_file_uri; ++ GnomeVFSURI *parent_uri; + FILE *source_file; + char *target_filename; + int fd; + ++ parent_uri = gnome_vfs_uri_new (parent_dir); ++ if (parent_uri == NULL) { ++ (*done_callback) (NULL, data); ++ return; ++ } ++ ++ source_file_str = g_build_filename (gnome_vfs_uri_get_path (parent_uri), ++ "nautilus-sourceXXXXXX", NULL); + fd = mkstemp (source_file_str); + if (fd == -1) { + (*done_callback) (NULL, data); +@@ -2486,6 +2495,8 @@ nautilus_file_operations_new_file (GtkWi + done_callback, + data); + ++ gnome_vfs_uri_unref (parent_uri); ++ g_free (source_file_str); + g_free (source_file_uri); + g_free (target_filename); + } -- cgit v1.2.3