D7043: Fix assert in UrlUtil::firstChildUrl()

Daniel Vrátil noreply at phabricator.kde.org
Tue Aug 1 18:29:52 UTC 2017


dvratil created this revision.
dvratil added a project: Frameworks.
Restricted Application added a subscriber: Frameworks.

REVISION SUMMARY
  When lastUrl = "file:///folder/" and currentUrl = "file:///folder" then currentUrl.isParentOf(lastUrl)
  returns true, which causes the code to hit an assert couple lines below the check and also to not
  adhere to its own documentation.
  
  This change fixes the behavior by first normalizing both URLs and then comparing them.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D7043

AFFECTED FILES
  autotests/urlutiltest.cpp
  src/filewidgets/urlutil_p.h

To: dvratil, dfaure, gregormi
Cc: #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20170801/fc18b9f3/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list