Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43105

QML FolderListModel cannot handle paths containing #

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.3.2
    • Quick: Other
    • None

    Description

      Passing an URL that contains an encoded # character in its path, e.g.

      file:///tmp/foo/%23 for path /tmp/foo/#

      leads to the parent directory,here /tmp/foo, being listed.

      The cause seems to be QQuickFolderListModelPrivate::resolvePath(), more precisely that it converts the correctly extraced local path into an URL again and then takes the path of that.

      The QQmlFile::urlToLocalFileOrQrc(path) call decoded the %23 correctly to #, the conversion to QUrl using the constructor overload for QString does not encode it again.

      Attachments

        1. resolvepath.cpp
          2 kB
          Kevin Krammer

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              srutledg Shawn Rutledge
              krake Kevin Krammer
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes