Bug 421914 - Notification from Dolphin shows wrong amount of deleted files when I delete a folder located in a Samba share
Summary: Notification from Dolphin shows wrong amount of deleted files when I delete a...
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-22 13:21 UTC by Patrick Silva
Modified: 2020-05-27 02:51 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.71


Attachments
screenshot (35.11 KB, image/png)
2020-05-22 13:21 UTC, Patrick Silva
Details
debug log (67.76 KB, text/plain)
2020-05-26 12:03 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-05-22 13:21:48 UTC
Created attachment 128692 [details]
screenshot

STEPS TO REPRODUCE
1. open a Samba share with Dolphin
2. select a folder containing several files (I selected a folder containing 125 jpg files)
3. delete the selected folder by pressing shift+del

OBSERVED RESULT
Notification from Dolphin shows wrong amount of deleted files.
See attached screenshot please.

EXPECTED RESULT
Notification from Dolphin should show the correct amount of deleted files.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.18.90
KDE Frameworks Version: 5.70.0
Qt Version: 5.15.0 rc2
Comment 1 Harald Sitter 2020-05-26 09:04:51 UTC
Can you reproduce this? How do you know there's 125 files? Are they actually all gone after deleting? Are there sub directories inside the directory you delete? also https://community.kde.org/Guidelines_and_HOWTOs/Debugging/Debugging_IOSlaves/Debugging_kio_smb#Reporting_Bugs

I for one cannot reproduce this. There is a bug with the notification that it doesn't actually update to N/N deleted (the deleted count is always off; I'm guessing because small files delete so fast that the deletion finishes and never bothers to "finalize" its notification to read 100/100 files and instead ends at 88/100). Thing is, for me the reference number is always the actual amount of files in the directory, the deleted count may be off, the reference count is never.
Comment 2 Patrick Silva 2020-05-26 12:03:20 UTC
Created attachment 128800 [details]
debug log

(In reply to Harald Sitter from comment #1)
> Can you reproduce this? How do you know there's 125 files? Are they actually
> all gone after deleting? Are there sub directories inside the directory you
> delete? also
> https://community.kde.org/Guidelines_and_HOWTOs/Debugging/Debugging_IOSlaves/
> Debugging_kio_smb#Reporting_Bugs
a. Yes, I can reproduce.
b. Status bar of Dolphin shows the amount of files.
c. Yes, all files are successfully deleted.
d. I can reproduce this bug no matter if there is a sub directory inside the directory or not.

Both client and server machines run Arch + samba 4.12.3. 

I'm attaching the debug log.
Comment 3 Harald Sitter 2020-05-26 12:46:29 UTC
Kai came up with https://invent.kde.org/frameworks/kio/-/merge_requests/13
Comment 4 Kai Uwe Broulik 2020-05-26 23:07:48 UTC
Git commit b7a9b547662b2b00df2e5f7e0b36b23007a28010 by Kai Uwe Broulik.
Committed on 26/05/2020 at 09:21.
Pushed by dfaure into branch 'master'.

[DeleteJob] Report final numbers after finishing

We only report progress periodically, so we might finish the job without
having reported the final numbers.

M  +5    -0    src/core/deletejob.cpp

https://invent.kde.org/frameworks/kio/commit/b7a9b547662b2b00df2e5f7e0b36b23007a28010