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

QDir entryInfoList not filtering out symlinks when told to do so

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.11.2
    • Fix Version/s: 5.12.2, 5.13.0 Alpha 1
    • Component/s: Core: I/O
    • Labels:
      None
    • Platform/s:
      Windows
    • Commits:
      524a37f99d3d3115a1b371fd289044d90349a824 (qt/qtbase/5.12)

      Description

      // Get a list of files and directories without symLinks
      QDir dir("/temp");
      QFileInfoList infoList = dir.entryInfoList(QDir::Dirs | QDir::Files | QDir::Hidden | QDir::System | QDir::NoDotAndDotDot | QDir::NoSymLinks );
      
       for (auto const& info : infoList)
      {
         if (info.isSymLink())   {
            continue; // This should not happen but it does
         }
      
         // Process files and directories that are not symlinks
      }
      

        Attachments

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

          Activity

            People

            Assignee:
            manordheim Mårten Nordheim
            Reporter:
            DidgetMaster Andy Lawrence
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes