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

QDir::entryList(QDir::System) reports broken .lnk (shortuct) files as system files on Windows 7

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P3: Somewhat important
    • None
    • 4.6.0
    • Core: I/O
    • None
    • Windows 7

    Description

      To reproduce this problem, create a test directory on your main hard drive and put a shortcut (.lnk) file into it to some other program or document. Right-click the properties of the file and remove the "target" path so that the shortcut becomes invalid.

      Now run this test code:

      QDir browser;
      browser.setCurrent(tr("C:
      test"));
      QStringList list;
      list = browser.entryList(QDir::System);
      QString entry;
      foreach(entry,list)
      qDebug() << entry;

      Note that when listing the contents of the directory containing the broken shortcut using the QDir::System flag, Qt reports it as being a system file.

      Attachments

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

        Activity

          People

            biochimia João Abecasis
            cattell Matthew Cattell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes