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

QFile fails to open files from GVfs FUSE in ReadWrite mode

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 5.7.1
    • Core: I/O
    • None
    • Tested on x86_64 Fedora 26 and indirectly also on some Ubuntu release with the same Qt5 version.

    Description

      When trying to open a file in R/W mode from GVfs FUSE mount point, QFile will fail with an unsupported operation error. This happens at least with Samba/CIFS mounts over the network when created with Nautilus.

      Opening such files with plain <cstdio> works fine.

      Attached is a test case that shows QFile failing in ReadWrite mode only. Sample run below:

      $ ./qfile-test /run/user/1000/gvfs/smb-share:server=1.2.3.4,share=hifi
      Using test file /run/user/1000/gvfs/smb-share:server=1.2.3.4,share=hifi/qfiled7KMke
      fopen('w') OK
      fopen('r') OK
      fopen('rw') OK
      QIODevice::WriteOnly OK
      QIODevice::ReadOnly OK
      Error opening QFile for QIODevice::ReadWrite: Operation not supported (5)
      

      Affected downstream application bug report:
      https://github.com/keepassxreboot/keepassxc/issues/803

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            hifi hifi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes