GNOME Bugzilla – Bug 389724
Nautilus, SSH: "Generic Error" while moving/copying file
Last modified: 2010-03-27 17:07:49 UTC
That bug has been described on https://launchpad.net/distros/ubuntu/+source/nautilus/+bug/45382 "Open a remote folder via SSH with nautilus. Open another remote folder. Drag and drop a file from one remote folder to the other. Get a "generic error". Screenshot to be attached. ... http://librarian.launchpad.net/2724232/Screenshot.jpg Screenshot,jpg Screenshot of the error message. ... > Does gnomevfs-mv works fine for that? Okay, I just tried several things. These all work okay: - gnomevfs-copy / ssh://cwagner@server/path/to/dir/briefcase.tmpl / ssh://cwagner@server/path/to/dir/survey.tmpl - gnomevfs-copy / ssh://cwagner@server/path/to/dir/survey.tmpl / ssh://cwagner@server/path/to/dir/survey.tmpl.bak - via Nautilus, moving *or* copying the file to *another directory*. For example, if I am sitting in ssh://cwagner@server/path/to/dir/ and select file.tmpl and hit Ctrl+C, then move up a directory to ssh://cwagner@server/path/to/ and paste by hitting Ctrl+V, all works okay. I can even *re-paste* over the file and I get a reasonable dialog warning me: "A file named "groups.tmpl" already exists. Do you want to replace it?" So, in my case, the problem seems to only occur when trying to copy a file and paste a copy back into the same directory in which the original exists. What do I expect to happen? I expect to get a copy of the file with a new name (e.g., "my-file.txt (Copy)") as happens when copying a file, using the same technique, within a local directory. ..."
The cause of this bug is that: In package "libgnomevfs2-0", file "modules/sftp-method.c", function "do_create" returns GNOME_VFS_ERROR_GENERIC instead of GNOME_VFS_ERROR_FILE_EXISTS when the file to create already exists, and argument "exclusive" is true. If it returned GNOME_VFS_ERROR_FILE_EXISTS, then nautilus would try other file names like "file (copy).txt", "file (another copy).txt" and such like.
Created attachment 87400 [details] [review] rough-and-ready fix This patch fixes the problem, but isn't the correct solution. It does demonstrate where the problem lies, however.
Created attachment 87438 [details] [review] a better patch This patch does what's right, checking whether the file really does exist before using the GNOME_VFS_ERROR_FILE_EXISTS return value.
Patch is for gnome-vfs, reassigning.
I believe this is not a problem with gvfs. So, if gnome-vfs is no longer being maintained, then it's probably worth closing this bug.
marked as fixed under ubuntu https://bugs.launchpad.net/nautilus/+bug/45382/ - presumably as a result of the move to gvfs
Assuming it's fixed by the move to gvfs.