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

QStorageInfo does not show FUSE mounts anymore

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P3: Somewhat important
    • 5.7.1, 5.8.0 Alpha
    • 5.6.1
    • Core: I/O
    • None
    • Arch Linux

    Description

      Hi,

      I've found aout that the qstorageinfo has changed recently. I'v got a
      fuse filesystem and a qt gui using that filesystem. To detect the
      mountpoint the gui uses QStorageInfo::mountedVolumes() and walk this
      list.

      This worked until recently, now the fuse is not found anymore. I've
      found out that the function
      isPseudoFs has been changed, and every fs where the device does not
      start with a slash is a pseudofs. Huhhh? This is far too strict.

      The manpage of mount describes for the device (or source):

      mount() attaches the filesystem specified by source (which is often a
      device name, but can also be a directory name or a dummy) to the
      directory specified by target.

      So there are no restrictions here it has to start with a slash. And
      the source -can- be something abstract, and not a device.

      Much much better would be a the use of filters simular to the QDir::entryInfoList.
      Suggestion:
      QStorage::All
      QStorage::Devices
      QStorage::Pseudo
      etc

      This leaves the programmer using this the freedom what to list.
      And maybe the name storageinfo is a bit misleading here, QFilesystemsInfo would be better.

      Stef

      https://codereview.qt-project.org/#/c/141217/
      http://fossies.org/diffs/qt-everywhere-opensource-src/5.6.0_vs_5.6.1/qtbase/src/corelib/io/qstorageinfo_unix.cpp-diff.html

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            stefbon Stef Bon
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes