GNOME Bugzilla – Bug 312145
[PATCH] Drag and Drop text in nautilus does not work
Last modified: 2005-07-31 18:43:28 UTC
Please describe the problem: Nautilus creates template files in /tmp in order to perform drag and drop test file creation. It then uses gnome-vfs to transfer these template files to their final destination (e.g. a user's Desktop). However, it sets the GNOME_VFS_XFER_REMOVESOURCE flag which instructs gnome-vfs to perform a move operation. When /tmp and the final destination are not on the same file system, the drag and drop will fail, and Nautilus will display the following dialog: ``Error Creating New Document Error creating new document. Error "Not on the same file system" creating new document.'' /tmp will also become cluttered with the many failed drag and drop template files. Steps to reproduce: 1. Drag and drop test from gedit to your desktop when your desktop is not on the same file system as /tmp. 2. Witness the dialog mentioned above. 3. Actual results: See above. Expected results: I would expect a new file to appear in the desired destination with the drag and dropped text. Does this happen every time? Yes. Other information: My solution is to use the current parent directory as the template's temporary source. That way, we can successfully move the template file to our destination. Since this is a move operation, the source file will disappear when it is done, and the user shouldn't notice a thing.
Created attachment 50025 [details] [review] Fix text drag and drop
Thanks for your efforts Joe! Unfortunately, your solution is not appropriate for three reasons a) clutter - it is not very friendly to put some random file into a directory, i.e. we abuse it as temporary storage b) it won't work for remote URIs, since gnome_vfs_uri_get_path will return NULL for these c) if it worked for remote URIs, it would be unbearably slow. The solution is to make gnome_vfs_async_xfer work with GNOME_VFS_XFER_REMOVESOURCE set. *** This bug has been marked as a duplicate of 309592 ***