[dolphin] [Bug 480111] Deleting a symlink is impossible if the disk of the target is close to full

Méven Car bugzilla_noreply at kde.org
Thu Sep 19 13:00:10 BST 2024


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

Méven Car <meven29 at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|REPORTED                    |CONFIRMED

--- Comment #4 from Méven Car <meven29 at gmail.com> ---
It seems the size calculation takes into account the symlink destination size
when it should'nt.

It is around this line, we don't check if the file is a symlink.
https://invent.kde.org/frameworks/kio/-/blob/master/src/core/copyjob.cpp#L834

But most importantly we should not resolve the symlink when stat() is called()
when moving the file.
(copy should still copy symlink destinations).
https://invent.kde.org/frameworks/kio/-/blob/master/src/core/copyjob.cpp#L1051

This bug could also affect moving such symlink anywhere on a drive that has
less space than the file it points to' size in some (rare) circumstances, since
`CopyJobPrivate::startRenameJob` does not check file size.

I wonder if we handle properly moving symlinks to trash:/ that would need a
unit-test.

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


More information about the kfm-devel mailing list