[kio-extras] [Bug 430585] rename() falling over case insensitivity

Harald Sitter bugzilla_noreply at kde.org
Thu Mar 4 11:16:16 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=430585

--- Comment #3 from Harald Sitter <sitter at kde.org> ---
Git commit 5abd1e8e981095b2c608042982f27a35f36d1b0c by Harald Sitter.
Committed on 04/03/2021 at 11:15.
Pushed by sitter into branch 'master'.

smb-notifier: do not send remove events on moving files

windows (but not samba interestingly) will send a REMOVE event before
the actual MOVE event this would mess with kio's dirlister's internal
state as it'd remove the file from the model and then never try to learn
about it again when it receives the move event. effectively this would
remove a file from the view in dolphin when renaming it as now both the
old name and the new name aren't in the dirlister model anymore.

to prevent this from happening a similar hack is applied to the event
order as with move merging.

when a remove arrives it's not immediately emitted but queued for up to
1000ms if a move event also arrives during that time frame the remove is
entirely discarded and we are left with only the move.
if any other event arrives the remove is immediately sent.
if nothing else arrives the timer runs out and the remove is sent.

so worst case a remove is only represented in the GUI after 1s, best
case it's more or less same as before with the added benefit that
renaming doesn't make files disappear

M  +91   -3    smb/kded/notifier.cpp

https://invent.kde.org/network/kio-extras/commit/5abd1e8e981095b2c608042982f27a35f36d1b0c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list