Created attachment 126577 [details] message shown when the file transfer is interrupted SUMMARY I tried to copy a big file to a samba share, file transfer was started and a few minutes later Dolphin shown an unhelpful message with "Retry" and "Cancel" buttons (see the attached screenshot). The file transfer was interrupted because no enough free space in destination. STEPS TO REPRODUCE 1. try to copy amount of data greater than free space available in the file system of a samba share 2. 3. OBSERVED RESULT Dolphin starts file transfer and shows an error message when file system of destination is full. EXPECTED RESULT Dolphin should check if there is enough free space available in destination before file transfer to be started. File transfer should only start if there is enough free space avaiable. SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.18.80 KDE Frameworks Version: 5.68.0 Qt Version: 5.14.1
That is, I believe, a defect in KIO itself. CopyJob uses KDiskFreeSpaceInfo to determine if there is enough space but KDiskFreeSpaceInfo only looks at mounts. As such this isn't specific to smb but really any remote file system. What either copyjob or kfreediskspaceinfo should do is query the slave for free space info when the URL is non-local. Easily reproduced with: fallocate -L 50M foo mkfs.ext4 foo mount foo /mnt chmod 777 /mnt/. -Rv # share /mnt # copy file > 50M
*** Bug 409805 has been marked as a duplicate of this bug. ***
There is FileSystemFreeSpaceJob which queries the slave.
Git commit 1cac602d9966f82a2e85440d74d9cc3ad014a1aa by Ahmad Samir. Committed on 09/05/2020 at 10:55. Pushed by ahmadsamir into branch 'master'. [CopyJob] Check free space for remote urls before copying and other improvements Summary: Use KIO::FileSystemFreeSpaceJob to check free space for remote urls. Thanks to sitter for pin-pointing the responsible code in the bug report, and to kbroulik for pointing out the existence of KIO::FileSystemFreeSpaceJob. Also use UDSEntry to check writability for both local and remote urls. FIXED-IN: 5.71 Test Plan: testtrash unit test fails (again...) - Find/create a local partition with a small capacity, copying a file/dir that is bigger than the partition will show the error message as before - Do the same for a remote url (I tested with sftp://), an error message about not having enough free space is shown Reviewers: #frameworks, dfaure, meven, sitter Reviewed By: dfaure Subscribers: ngraham, kde-frameworks-devel Tags: #frameworks Differential Revision: https://phabricator.kde.org/D29485 M +51 -35 src/core/copyjob.cpp https://commits.kde.org/kio/1cac602d9966f82a2e85440d74d9cc3ad014a1aa