After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 389724 - Nautilus, SSH: "Generic Error" while moving/copying file
Nautilus, SSH: "Generic Error" while moving/copying file
Status: RESOLVED OBSOLETE
Product: gnome-vfs
Classification: Deprecated
Component: Module: ssh/sftp
2.17.x
Other Linux
: Normal minor
: ---
Assigned To: gnome-vfs maintainers
gnome-vfs maintainers
Depends on:
Blocks:
 
 
Reported: 2006-12-26 13:24 UTC by Sebastien Bacher
Modified: 2010-03-27 17:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
rough-and-ready fix (372 bytes, patch)
2007-05-02 16:56 UTC, Dooglus
none Details | Review
a better patch (583 bytes, patch)
2007-05-03 09:00 UTC, Dooglus
none Details | Review

Description Sebastien Bacher 2006-12-26 13:24:02 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.
..."
Comment 1 Dooglus 2007-05-02 12:11:41 UTC

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.
Comment 2 Dooglus 2007-05-02 16:56:31 UTC
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.
Comment 3 Dooglus 2007-05-03 09:00:19 UTC
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.
Comment 4 Martin Wehner 2007-05-05 13:16:20 UTC
Patch is for gnome-vfs, reassigning.
Comment 5 Chris Wagner 2008-04-09 04:36:32 UTC
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.
Comment 6 davie moston 2008-08-18 23:02:32 UTC
marked as fixed under ubuntu https://bugs.launchpad.net/nautilus/+bug/45382/ - presumably as a result of the move to gvfs
Comment 7 André Klapper 2010-03-27 17:07:49 UTC
Assuming it's fixed by the move to gvfs.