Bug 412163 - Only check for required free space after asking the user whether or not to merge, and if merging, intelligently determine the space needed based on what needs to be merged
Summary: Only check for required free space after asking the user whether or not to me...
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Overwrite dialog (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2019-09-21 16:01 UTC by dft
Modified: 2022-12-05 15:46 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dft 2019-09-21 16:01:01 UTC
SUMMARY
Lets say I have 100GB free. I want to RESUME copying a folder onto the drive of 120GB. Lets say it only has 2GB of copying needed as I stopped it around 118GB copied. I will get an error saying "There is not enough space on the disk to write file". This is false as once the folder was merged I would have 98GB free. It falsely assumes I need space for the ENTIRE copy. This means I can't use Dolphin to resume a copy and have to open up another file manager that checks for free space DURING the copy not before.

STEPS TO REPRODUCE
1. Format a 32GB partition
2. Try copy 20GB on to it
3. Cancel the copy at around 16GB copied - You should have 16GB free
4. Try resuming the copy - technically it should now only need to copy the missing 16GB.
5. It will fail as it assumes it needs 20GB free...


OBSERVED RESULT
"There is not enough space on the disk to write file"

EXPECTED RESULT
Copying should resume just fine when clicking merge. Available space needed should be an information message not a halt type message

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 5.16
(available in About System)
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
This is a show stopper for Dolphin
Comment 1 dft 2019-09-21 16:02:54 UTC
Typo on #4 should say "missing 4GB"

4. Try resuming the copy - technically it should now only need to copy the missing 4GB.
Comment 2 Nate Graham 2019-09-21 21:20:17 UTC

*** This bug has been marked as a duplicate of bug 141564 ***
Comment 3 dft 2019-09-30 14:50:54 UTC
(In reply to Nate Graham from comment #2)
> 
> *** This bug has been marked as a duplicate of bug 141564 ***

Hi Nate, you have marked this as a dup of bug 141564. That is not correct. but *564 is about checking whether the destination is writeable or not. Bug 412163 is not the same thing. In this case the destination IS WRITEABLE. 

As mention in the first comment, lets say have partially copied a 30GB folder and stopped at 28GB copied. Now you want to resume the missing files, Dolphin will assume it has to copy the whole 30GB again and therefore fails saying insufficient space. Meanwhile it only has to copy 2GB. Therefore this is not the same bug at all.
Comment 4 Nate Graham 2019-10-07 17:00:49 UTC
Darn, I remember that we fixed this in the past. I guess it's back... :/
Comment 5 Nate Graham 2019-10-07 17:03:03 UTC
Oops, wrong bug.
Comment 6 Nate Graham 2019-10-08 17:40:20 UTC
Yes, you're right, it's not a duplicate.
Comment 7 Ahmad Samir 2021-06-14 16:48:47 UTC
I don't see how that would work; we'd need something like an rsync-algorithm to compare the source and dest, to see what can be skipped and what needs to be copied.

FWIW, for big copy/move operations like these I'd use rsync from terminal.
Comment 8 dft 2021-06-14 17:14:20 UTC
I don't think you need to compare, Dolphin just needs a SKIP ALL that DOES NOT look and assume there isn't enough free space. EG

You copy 16GB, you cancel at 14GB for what ever reason. Free space (after the 14GB) is 10GB. Now you copy again, technically it should only take up 2GB more and means you DO have enough space, but Dolphin assumes you need to copy the WHOLE 16GB again. A skip all (ignore space) option should be quick to develop. That way it can just skip the files already copied and you will sit with 8GB free.
Comment 9 Ahmad Samir 2021-06-14 18:01:19 UTC
The code doesn't know that some files were copied, and then the copy was cancelled then resumed :)

The only way to know would be to list all the dirs in both source and destination, which would take time depending on the sizes of those dirs.
Comment 10 dft 2021-06-14 18:32:37 UTC
I think you are over complicating the solution. It it does not need to know it was cancelled.

Say you are copying a folder of movies. You cancel cause you have to go out or what ever and shutdown. Now you come back and want to resume. A simple SKIP ALL instead of a global check for free space would be fine. This would be VERY fast and has been done this way for years, just look at Total Commander.
Comment 11 dft 2021-11-10 12:38:44 UTC
Please can we just disable checking for freespace. It's now end 2021 and Dolphin is useless for merging. It means I have to use rscync or krusader to do such a simple task...

Again I have to copy 420GiB folder from Drive A to B. B ALREADY has 300GiB of the folder. Now Dolphin moans and STOPS me from even copying because only 400GiB is free...This is ridiculous and pathetic design flaw which can be solved in seconds. Just disable checking.
Comment 12 dft 2022-12-05 15:46:46 UTC
I would like to bring this up again and keep it simple with another use case. You have a folder of 500GB and want to copy to a drive that has 480GB free. Destination is ZFS  or BTRFS with compression means it should EASILY be able to handle it 500GB data. This is why I think going ahead it's even more important for Dolphin to have an option to check if sufficient space is available or not. Without this option it means Dolphin can not be used at all as a FM with "modern" filesystems. Instead I have to open DC. It should have the option to "copy anyway" even if Dolphin "thinks" there's not enough free space.