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

QDir reports directories twice

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • 5.3.1
    • 5.3.0 Beta1
    • QPA
    • None
    • QNX
    • aee59f06e0017e225363d4207d3d96c2b30698e1

      In some cases QDir::entryInfoList() reports directories twice on QNX. QDir::entryInfoList uses QFileSystemIterator which uses readdir(2). The latter sometimes reports directories twice, if dircntl() is called to request extra stat information.
      There is a QNX bug report (internally COREOS-45869) to track this issue.
      In the meantime extra stat information should not be requested (better be correct than faster).
      Once the OS issue is solved extra stat information should be requested again.

      @@ QFileSystemIterator::QFileSystemIterator(const QFileSystemEntry &entry, QDir::Fi
               mt_file.reset(p);
       #if defined(Q_OS_QNX) && defined(__EXT_QNX__READDIR_R)
               direntSize = maxPathName;
      -
      -        // Include extra stat information in the readdir() call (d_stat member of dirent_extra_stat).
      -        // This is used in QFileSystemMetaData::fillFromDirEnt() to avoid extra stat() calls when iterating
      -        // over directories
      -        if (dircntl(dir, D_SETFLAG, D_FLAG_STAT) == -1)
      -            lastError = errno;
       #endif
       #endif
           }
      

        For Gerrit Dashboard: QTBUG-38189
        # Subject Branch Project Status CR V

            bweimer Bernd Weimer
            bweimer Bernd Weimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes