Fix crash/assert on opening files with similar paths
Review Request #123793 - Created May 14, 2015 and submitted
|Albert Astals Cid|
In KateFileTreeModel::handleDuplicitRootDisplay we need to check if check_root has been removed in the loop of rdir, if it has there's no need to remove it on the nrdir branch, doing so asserts on debug builds and on release builds it creates a broken tree structure that will crash later when trying to use it.
Doesn't crash anymore, added new test that passes, old tests still pass.
That's pretty nasty piece of code of mine, sorry for that:) Your change seems reasonably ok, thanks for not missing the tests!;-) I'm giving you "ship it", but my word bares a little in these days, so please wait for the ktexteditor sages.