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

QUrl.adjusted doesn't work with QUrl::RemoveFilename | QUrl::NormalizePathSegments

    XMLWordPrintable

Details

    • Linux/Wayland
    • c9ff62586 (dev), fee6283b8 (6.8), 828ef6b4c (6.7), 0bf48e28f (tqtc/lts-6.5), e4b298316 (6.8.0)

    Description

      run the following code segment:

      #include <QUrl>
      #include <QDebug>
      
      int main(int argc, char *argv[])
      {
          QUrl url("/root/test/../foo/bar");
          qDebug() << url.adjusted(QUrl::RemoveFilename | QUrl::NormalizePathSegments).toString();
      
      }

      observed result: "/root/test/../foo/"

      expected output: "/root/foo/"

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            fanzhuyifan Yifan Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: