Bug 505727 - Overwriting a symlink with a file via FISH protocol does not remove the symlink
Summary: Overwriting a symlink with a file via FISH protocol does not remove the symlink
Status: RESOLVED UNMAINTAINED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 20.12.2
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-18 07:54 UTC by Claudio Canavese
Modified: 2025-06-19 18:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claudio Canavese 2025-06-18 07:54:49 UTC
SUMMARY
Copying a file with the same name of an existing symlink using FISH protocol changes the content of the linked file. 
The same action performed via SFTP or on a local filesystem behaves as expected: the symlink is removed and replaced with the new file, since it's a symbolic link and not a hard link.

STEPS TO REPRODUCE
1. create the environment:

mkdir -p fishbug/f1 fishbug/f2 fishbug/f3
cd fishbug
echo 1 > f1/a; echo 1 > f1/b
echo 3 > f3/a; echo 3 > f3/b
echo 2 > f1/a;
cd f2
ln -s ../f3/b .

2. now copy both files from f1 to f2 overwriting existing content
3. check the content of file in f3

OBSERVED RESULT
The synlink in f2 is followed and the content of f3/b is altered

EXPECTED RESULT
The symlink in f2 is removed and replaced with a regular file from f1
This happens both on a local filesystem and via SFTP

SOFTWARE/OS VERSIONS
Tested on 
- Dolphin 20.12.2 on Debian 11, KDE Frameworks 5.78.0, Qt 5.15.2
- Dolphin 22.12.3 on Debian 12, KDE Frameworks 5.103.0, Qt 5.15.8

ADDITIONAL INFORMATION
Link to similar bugs:
https://bugs.kde.org/show_bug.cgi?id=465762
https://bugs.kde.org/show_bug.cgi?id=478212
both related to saving to a symlink, which is a completely different action from copying/moving files

https://bugs.kde.org/show_bug.cgi?id=359027
Request to add possibility to dereference symlinks during copy/move jobs
Comment 1 TraceyC 2025-06-19 18:37:11 UTC
Hi, I'm afraid Dolphin 20.x and 22.x are unfortunately no longer eligible for support or maintenance from KDE.

Debian advises users to not submit bugs upstream (https://www.debian.org/Bugs/Reporting).

Could you report the bug to Debian using the report bug utility (https://packages.debian.org/stable/utils/reportbug)? If necessary, the maintainer of the package will forward the bug upstream.

Thanks for understanding!