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

QStorageInfo gets the wrong information for sibling directories to mountpoints

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.4.2
    • Fix Version/s: 5.6.2
    • Labels:
      None
    • Environment:
      CentOS6.6 x64 GNOME Qt 5.4.2

      Description

      minimal sample code:

      #include <QStorageInfo>
      #include <QDebug>
      int main()
      {
          QStorageInfo sys("/sys");
          QStorageInfo sys1("/sys123");
          
          //  here it can output the right filesystemType :  sysfs
          qDebug() << "/sys fstype:" << sys.fileSystemType();
      
          //  /sys123 is an existed directory I create, it's filesystemType should be ext4
          //  but it recognize it the same as sysfs
          qDebug() << "/sys123 fstype:" << sys1.fileSystemType();
      }
      

      I try several times and find that,
      if the prefix of the path containing the mount point,
      like /sys123 containing /sys, it would recongnize it /sys,
      the same like /proca/888 and /procpaum would recognize as /proc,

        Attachments

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

          Activity

            People

            • Assignee:
              thiago Thiago Macieira
              Reporter:
              TraumLou Traum Lou
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes