Review Request 110225: Fix KMountPoint::List::findByPath(const QString&): /books is not a sub-path of /book

Frank Reininghaus frank78ac at
Sat Apr 27 22:29:29 BST 2013

This is an automatically generated e-mail. To reply, visit:

Review request for kdelibs, David Faure and Jekyll Wu.


The current algorithm that tries to find out what mount point a path belongs to only checks if the first part of the string matches the mount point. The problem is that /books is then considered a path inside /book, which is obviously wrong.

I propose to fix this by verifying that either the mount point ends with a '/', or the first char of the path that does not match the mount point is a '/'. I've factored this check out into a separate function to keep the code readable.

Many thanks to Jekyll Wu, who analyzed this bug and found the right place in the code.

This addresses bug 193298.


  kdecore/io/kmountpoint.cpp aa7a6b1 



Works for me.


Frank Reininghaus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the kde-core-devel mailing list