Bug 389437

Summary: Dolphin does not deal well with a file that is visible on two places via a hardlink and that is moved onto itself
Product: [Applications] dolphin Reporter: David Tonhofer <bughunt>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: minor CC: elvis.angelaccio, mail, nate
Priority: NOR    
Version: 17.12.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description David Tonhofer 2018-01-25 22:35:34 UTC
Suppose you have A/F1.txt and B/F1.txt

Both files are backed by the same inode.

If you move A/F1.txt into directory B, Dolphin pops up a dialog saying:

"The action will overwrite the destination".

Click on "Overwrite".

The dialog disappears then reappears immediately, nothing is "moved".

This goes on forever until you "Cancel".

It is unclear what Dolphin SHOULD do in this case.

Maybe unlink A/F1.txt. Or tell the user that A/F1.txt and B/F1.txt are actually the same file and it will skip moving the file.
Comment 1 Christoph Feck 2018-02-14 17:22:46 UTC
Trying the same with 'mv' from Konsole:

mv: 'A/F1.txt' and 'B/F1.txt' are the same file
Comment 2 Julian Steinmann 2018-07-15 13:08:45 UTC
So according to the output of mv, Dolphin should probably follow this way and display a message to the user. Because the behavior described in the original report is still present in Dolphin 18.04.3, I'll confirm the report.