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 512392 - Copy file/folder to the same location
Copy file/folder to the same location
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: [obsolete] GIO
2.21.x
Other All
: Normal minor
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 512909 514236 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-01-27 15:49 UTC by Andreas Dalsgaard
Modified: 2008-02-20 09:58 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Andreas Dalsgaard 2008-01-27 15:49:12 UTC
Please describe the problem:
Usually when making a copy of for instance /home/joe/file.tex to /home/joe/ would create a new file called 'Copy of file.tex' in /home/joe/. This is no longer the case

Steps to reproduce:
1. Select a file press ctrl+c followed by ctrl+v in the same folder




Actual results:
Nautilus will ask if you want to replace the selected file

Expected results:
Nautilus used to make a new copy of the file

Does this happen every time?
Yes

Other information:
The same seems to be the case with folders
Comment 1 Christian Kirbach 2008-01-27 16:21:23 UTC
Adding the usability team.

I am not sure if we want file names like "Copy of foo".
Comment 2 Andreas Dalsgaard 2008-01-27 17:26:00 UTC
Okay, but what is the planned/intended behaviour?

I see a few problems as it is now:
1: Behaviour should be the same regardless of it is a local or remote file
2: Needs to ensure that the user does not loss data
3: Should be possible to easily make 10 copies of a small file

1+2:
For instance assume Joe has a k56 modem and has just finished downloading an iso of Knoppix, then by mistake he ctrl+c and ctrl+v in the same directory and presses replace. Now the file is overwritten by the same file but what should happen if Joe press cancel because he discovers this was not what he intended? Right now it seems to work for local filesystems(seems to work at reiserfs, except nautilus crashes if I press reload afterwards) but for remote files at least sftp, this does not work and only the part copied remains!!!

3: 
I believe there are two main uses of the "Copy of foo" "feature" first it can be used to create 10 copies of a file where you want to have some similar contents in the files. Or it can be used if you want to create say 10 text documents in the same folder.

In the first use case you would need to ctrl+c the file, move to another directory, ctrl+v, rename, ctrl+v, rename, ctrl+v, rename, ..., select the files, ctrl+x, move back to the dir, ctrl+v
This is much slower than,  ctrl+c followed by ctrl+v +v ..., rename, ...

In the second use case you would now need to right click select "create document" and chose the type of document and rename the file, and repeat this 10 times again this is much slower than simply ctrl+c followed by ctrl+v +v ..., rename, ...
Comment 3 Cosimo Cecchi 2008-01-27 18:13:17 UTC
-> GIO

This has also something to do with #134251, but indeed there's a regression from 2.20, where "Copy of foo" was made automatically.
Comment 4 Cosimo Cecchi 2008-01-29 23:44:20 UTC
*** Bug 512909 has been marked as a duplicate of this bug. ***
Comment 5 Jonh Wendell 2008-02-11 13:30:34 UTC
*** Bug 514236 has been marked as a duplicate of this bug. ***
Comment 6 Matthew Wardrop 2008-02-16 04:26:01 UTC
Perhaps it is better just to have in that dialog, which has "Skip" and "Replace", an option to Rename. This has been in KDE for some time.
Comment 7 Matteo Settenvini 2008-02-16 10:35:12 UTC
That dialog is getting a little bit crowded from a usability standpoint. What about having a checkbox named "Apply to all?" instead that two separated buttons "Skip all" and "Replace all"?

That would save us two buttons.
Just an idea, though.
Comment 8 Björn Martensen 2008-02-16 12:24:22 UTC
(In reply to comment #7)
> That dialog is getting a little bit crowded from a usability standpoint. What
> about having a checkbox named "Apply to all?" instead that two separated
> buttons "Skip all" and "Replace all"?
> 
> That would save us two buttons.
> Just an idea, though.
> 

that's what apple does in their finder too. i kinda like it, so i'd vote yes for the checkbox.
Comment 9 Alexander Larsson 2008-02-20 09:58:02 UTC
2008-02-20  Alexander Larsson  <alexl@redhat.com>

        * libnautilus-private/nautilus-file-operations.c:
	Duplicate if src and dest dirs are the same (#512392)