diff options
author | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-08-01 02:35:06 +0800 |
---|---|---|
committer | marcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059> | 2005-08-01 02:35:06 +0800 |
commit | f011eb35d950c2ec743d29ae4c02a40ad9f62aef (patch) | |
tree | 3a6da04827f8466d20002b3743c14a8930c2e66c /x11-fm/nautilus2/files/patch-libnautilus-private_nautilus-file-operations.c | |
parent | 38e59c96c7823f06e7fca0ea13ebe9645e6f597d (diff) | |
download | marcuscom-ports-f011eb35d950c2ec743d29ae4c02a40ad9f62aef.tar marcuscom-ports-f011eb35d950c2ec743d29ae4c02a40ad9f62aef.tar.gz marcuscom-ports-f011eb35d950c2ec743d29ae4c02a40ad9f62aef.tar.bz2 marcuscom-ports-f011eb35d950c2ec743d29ae4c02a40ad9f62aef.tar.lz marcuscom-ports-f011eb35d950c2ec743d29ae4c02a40ad9f62aef.tar.xz marcuscom-ports-f011eb35d950c2ec743d29ae4c02a40ad9f62aef.tar.zst marcuscom-ports-f011eb35d950c2ec743d29ae4c02a40ad9f62aef.zip |
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
Diffstat (limited to 'x11-fm/nautilus2/files/patch-libnautilus-private_nautilus-file-operations.c')
-rw-r--r-- | x11-fm/nautilus2/files/patch-libnautilus-private_nautilus-file-operations.c | 34 |
1 files changed, 34 insertions, 0 deletions
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); + } |