Bug 491210

Summary: Dolphin does size calculation before asking if it should override
Product: [Applications] dolphin Reporter: jakobdev
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: eduardosareias, felixernst, kfm-devel, mashkal2000
Priority: NOR    
Version: 24.05.2   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: A script to make the bug better reproduceable

Description jakobdev 2024-08-03 09:41:12 UTC
Created attachment 172240 [details]
A script to make the bug better reproduceable

SUMMARY
I re encoded my Movie collection to make some space on my external hard drive. The re encoded Videos were on another drive. So I ended upon with the following:
- The Directory with the original Video files on my external drive. Size: 400GB
- The Directory with the re encoded files on another drive (same filenames). Size: 285GB
- 125GB free space on my external drive
But when I wanted to copy the re encoded files to my external drive, Dolphin refuses to copy the files, because it doesn't have enough space. It didn't ask me if I want to override the old files.

STEPS TO REPRODUCE
1. Have Directory A
2. Have Directory B on another Drive
3. Directory B should have files with the exact Names (but smaller) as Directory A
4. The drive of Directory A should have less free space than the size of Directory B
5. Copy all files from Directory B to Directory A

To make this easier to reproduce I have attached a little script. Just run the script and try to copy test.bin from /tmp/bugdemo/b to /tmp/bugdemo/a.

OBSERVED RESULT
Dolphin claims there is not enough space.

EXPECTED RESULT
Dolphin should ask if I want to overwrite the files. As the files in B are smaller as in A, I should have more free space at the end of the overwriting.
Comment 1 Felix Ernst 2024-08-05 15:20:50 UTC
*** Bug 491003 has been marked as a duplicate of this bug. ***
Comment 2 Eduardo Correia 2024-08-08 16:36:03 UTC
Adding my +1 to this report. Dolphin should compare files, ask to override files with the same name and other this BEFORE making the space calculation. And only check if the target device has free space for the files that will actually be copied