https://bugs.kde.org/show_bug.cgi?id=375831
Alex Bikadorov <alex.bikado...@kdemail.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Latest Commit| |https://commits.kde.org/kru | |sader/1db4a2b8a3e6de837fea5 | |a90988cc5576de52ea7 --- Comment #3 from Alex Bikadorov <alex.bikado...@kdemail.net> --- Git commit 1db4a2b8a3e6de837fea5a90988cc5576de52ea7 by Alexander Bikadorov, on behalf of Wladimir Palant. Committed on 13/02/2017 at 20:34. Pushed by abikadorov into branch 'master'. #375831 - Sort empty file extensions correctly Summary: This change makes sure that empty strings are sorted before non-empty strings. Note that it is treating the case where both strings are equal specially, this is for consistency with the logic at the bottom of compareTextsAlphabetical() and compareTextsCharacterCode(). I don't see a difference if I leave out this case but if it is important then personally I would have written this differently: ``` if (aS2.length() == 0) { return false; } else if (aS1.length() == 0) { return true; } ``` The checks in compareTextsAlphabetical() can be simplified similarly: ``` if (lPositionS2 == aS2.length()) return false; else if (lPositionS1 == aS1.length()) return true; ``` These two comparisons produce the same result as the six comparisons currently there. Test Plan: See STR in bug. Reviewers: #krusader, martinkostolny, abika, asensi Reviewed By: #krusader, martinkostolny, abika, asensi Subscribers: asensi, martinkostolny, #krusader Tags: #krusader Differential Revision: https://phabricator.kde.org/D4417 M +5 -4 krusader/Panel/krsort.cpp https://commits.kde.org/krusader/1db4a2b8a3e6de837fea5a90988cc5576de52ea7 -- You are receiving this mail because: You are watching all bug changes.