Ticket #2745 (closed defect: duplicate)

Opened 8 years ago

Last modified 8 years ago

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:


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.

Change History

comment:1 follow-up: ↓ 2 Changed 8 years ago by andrew_b

Looks like duplicate of #20.

comment:2 in reply to: ↑ 1 Changed 8 years ago by guanx

Replying to andrew_b:

Looks like duplicate of #20.

Yes, indeed!

comment:3 Changed 8 years ago by andrew_b

  • Status changed from new to closed
  • Version master deleted
  • Resolution set to duplicate
  • Milestone Future Releases deleted

Ok, closed.

Note: See TracTickets for help on using tickets.