Bug 504660

Summary: Dolphin refuses copy due to space, fails to consider reflink copies
Product: [Applications] dolphin Reporter: Felix Urbasik <fell>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: minor CC: fell, kfm-devel
Priority: NOR    
Version First Reported In: 25.04.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=419010
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Felix Urbasik 2025-05-22 10:15:16 UTC
SUMMARY
When attempting to copy a directory that is larger than the remaining space on the device, Dolphin refuses the copy operation after examining the directory with the message "There is not enough space on the disk to write ..."

While *technically* correct, this does not apply to filesystems that support reflinks, such as XFS in this case.

STEPS TO REPRODUCE
1. Obtain a XFS filesystem. (May also apply to: bcachefs, btrfs, possibly ZFS and network file systems as well)
2. Create a directory (or file) to occupy more than half of the available space.
3. Attempt copy it within the same filesystem.

OBSERVED RESULT
Dolphin refuses to copy, shows message: "There is not enough space on the disk to write ..."

EXPECTED RESULT
Dolphin recognises that a reflink copy can be performed and continues to do so. Just like the `cp` command would. 

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.14.0
Qt Version: 6.9.0
Kernel Version: 6.14.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 62.7 GiB of RAM
Graphics Processor: AMD Radeon RX 7900 XT

ADDITIONAL INFORMATION
This *may* be actually a KIO issue, but I also tested Krusader and it does not seem to be affected. Therefore I'm filing this as a Dolphin bug.