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

QDirListing includes '.' and '..'

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes