Follow

Just discovered and fixed a (potentially serious) bug in Dolphin, KDE's file manager and generic file model:

Sorting by size would cause an unstable sort order under certain circumstances.

This sounds innocent at first, until you realize this also causes it to expand a folder's content into the wrong view parent: you expand folder A, but all its files show up below folder B.

You may think you're deleting an empty folder, but it's not actually empty 😟

Fix here: invent.kde.org/system/dolphin/

· · Web · 7 · 17 · 65

Quick update: the fix has been approved and landed in master as well as the stable branch for the upcoming 21.08 release of Dolphin! ❤️

@fribbledom huh. that just seems like bad design, why would Dolphin depend so much on the index of the folder in the list? does it not have, like, a hashtable with stable IDs by which it can reference objects in the file model???

@keith

It does have stable/unique IDs per item and the bug was that sorting by size caused that not to be used. As a result the sort order between two items of the same size became non-deterministic.

@fribbledom i use dolphin and sort by size often. You might be saving my future ass here :'D <3

@fribbledom
→ You may think you're deleting an empty folder, but it's not actually empty 😟

… it is now!

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!