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

QDirListing includes '.' and '..'

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.8.0 Beta2, 6.9.0 FF
    • 6.8
    • Core: I/O
    • None
    • All
    • e583c3d51 (dev), 7c663d04d (6.8)

    Description

      QDirListing l(QDir::homePath());
          for (const auto &e : l)
              qDebug() << e.absoluteFilePath();
      

      produces sth like

      Qt 6.8.0 (x86_64-little_endian-lp64 shared (dynamic) debug build; by GCC 13.2.0)
      
      "/home/user/Public"
      "/home/user/Desktop"
      "/home/user"
      "/home"
      ....
      

      It seems it also visits '.' and '..' which is quite unexpected and surprising.

      Attachments

        1. qtbug125504.zip
          0.9 kB
          Friedemann Kleint

        Issue Links

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

          Activity

            People

              ahmad.samir Ahmad Samir
              kleint Friedemann Kleint
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes