Bug 343669

Summary: Overwrite symlink with original file not possible by pasting
Product: [Frameworks and Libraries] frameworks-kio Reporter: Gregor Mi <codestruct>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: minor CC: chinmoyrp65, frank78ac, h.klene, kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: 5.45.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Gregor Mi 2015-02-01 22:09:19 UTC
Overwrite symlink with original file is not possible by pasting original file over symlink.

Reproduce:

1) Have symlink S1 to a file F1 in another folder
2) Copy F1
3) Go to directory where S1 is located
4) Press Ctrl+V
5) A message appears: "This action would overwrite ... with itself ..." and the "Continue" option is disabled.

Expected:
The message should be different. The "Continue" button should be enabled. Click Continue: S1 is replaced by F1.
Comment 1 Frank Reininghaus 2015-02-01 22:17:34 UTC
Thanks for the bug report. I'm not sure if I understand you correctly. If the name of the symlink is S1, and the file name is F1, then pasting works fine here. But since you mention "overwriting", I assume that you actually mean that the names are equal?

In that case, this is not a Dolphin issue (it's also reproducible in, e.g., FolderView).
Comment 2 Gregor Mi 2015-02-01 22:50:22 UTC
Yes, my original example was misleading. The names are equal. To reproduce, try to copy
F1 (/path/to/the/file/hello.txt)
and paste it over
S1 (/path/to/the/symlink/hello.txt [points to /path/to/the/file/hello.txt]).
Comment 3 Holger 2016-07-26 16:03:46 UTC
This would allow for easy recover after accidentally creating links, although a move/copy was intended: Just repeat the drag&drop and choose a different modifier key.

Whereas now, you first have to select all the invalid links and delete them, before again selecting the sources and repeating the drag.