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

QML FolderListModel cannot handle paths containing #

XMLWordPrintable

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

      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.

        1. resolvepath.cpp
          2 kB
          Kevin Krammer
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes