[dolphin] [Bug 505727] New: Overwriting a symlink with a file via FISH protocol does not remove the symlink

Claudio Canavese bugzilla_noreply at kde.org
Wed Jun 18 08:54:49 BST 2025


https://bugs.kde.org/show_bug.cgi?id=505727

            Bug ID: 505727
           Summary: Overwriting a symlink with a file via FISH protocol
                    does not remove the symlink
    Classification: Applications
           Product: dolphin
      Version First 20.12.2
       Reported In:
          Platform: Debian stable
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: dolphin-bugs-null at kde.org
          Reporter: 12031+k93 at pm.me
                CC: kfm-devel at kde.org
  Target Milestone: ---

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list