Fuse prefix is not recognized for symlinked files during GFile object creation
Submitted by Dariusz Gadomski
Assigned to gvf..@..e.bugs
Link to original bug (#768281)
Description
Created attachment 330723 full vfs.debug
Platform: Ubuntu from 14.10+ (including the latest 16.04)
Steps to reproduce:
- Setup a gvfs mount (I used smb and sftp shares configured via nautilus).
- Create a symlink to the fuse-mounted location e.g. cd ~/Desktop; ln -sf /run/user/1000/gvfs/smb-share:server=10.0.20.6,share=share1/symlinktest
- Navigate with nautilus to the symlinked location, open a file available there with e.g. gedit or libreofficeand try to save it.
Expected result: File is saved.
Actual result:
An enigmatic error message is displayed
(Cannot handle "file:" locations in write mode - for gedit, or "General input/output error while accessing <path>
" for libreoffice).
The problems started with commit 548ba46c fuse: Don't g_file_append_to unless O_APPEND is given. Reverting it makes the issue disappear.
I have rebuild gvfs enabling debugging (#define DEBUG_ENABLED 1) and here is what I got in ~/vfs.debug:
accessing via symlink
vfs_open: /smb-share:server=10.0.20.6,share=share1/grouptest/symlinktest/test open_common: flags=500002 vfs_open: -> Operation not supported
accessing via /run/user/(...)
vfs_open: /smb-share:server=10.0.20.6,share=share1/grouptest/symlinktest/test open_common: flags=1100000 setup_input_stream: have stream setup_input_stream: doing read vfs_open: -> Success
For reasons beyond my understanding the flags are different while accessing the file via the default gvfs-mountpoint causing the execusion to skip the modified section of client/gvfsdfusedaemon.c (returning -ENOTSUP).
I am attaching the full vfs.debug created.
Attachment 330723, "full vfs.debug":
vfs.debug
Version: git master