Ticket #2745 (closed defect: duplicate)
Merging directory with (F6 | Move) does copy instead of rename
Reported by: | guanx | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | mc-core | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | no branch | Votes for changeset: |
Description
Moving a directory $dir into a directory containing a subdir with the same name as $dir does copy $dir's content instead of first trying a "rename".
For example:
├── dir1
│ └── file
└── dir2
└── dir1
Then "(F6 | Move) /dir1 /dir2" will copy "file" even when "dir1" and "dir2/dir1" are on the same filesystem.
This problem comes from the code
copy_dir_dir (...)
{
...
if (mc_stat (d, &buf))
{
/* Here the dir doesn't exist : make it ! */
if (move_over)
...
}
i.e., it does not try to "move" or "rename" when merging two dirs with the same name.
Note: See
TracTickets for help on using
tickets.
Looks like duplicate of #20.