Dolphin does not open/read .directory file on fuse.

Stef Bon stefbon at gmail.com
Sat Jul 1 20:36:37 BST 2017


Hi,

I'm working on a fuse fs which provides browsing sftp folders on ssh
servers, found with avahi.
One feature what I would like to be enabled is making a folder which
represents a server, also looks like a server. Therefore my fuse fs
provides access to .directory files in the "server" directory which
are read by dolphin and should enable a custom icon, for example:

$ cat /run/fs-workspace/user/sbon/network/SFTP\
Network/bononline.nl/alarm/.directory
[Desktop Entry]
Icon=/usr/share/icons/Adwaita/256x256/places/network-server.png
Type=Service

Now this .directory file is not read by dolphin, while the exact same
file in /home/sbon/Temp is.

i've enabled debugging of the most important kio slaves and did a
strace, first on the /home/sbon/Temp folder, and then a strace on the
/run/fs-workspace/user/sbon/network/SFTP\ Network/bononline.nl/alarm
folder:

$strace -P "/home/sbon/Temp" -P "/home/sbon/Temp/.directory" dolphin

gave me info like:

statfs("/home/sbon/Temp", {f_type=EXT2_SUPER_MAGIC, f_bsize=4096,
f_blocks=18132350, f_bfree=7429012, f_bavail=6569973, f_files=4611264,
f_ffree=3602197, f_fsid={val=[2512731478, 3774267412]}, f_namelen=255,
f_frsize=4096, f_flags=ST_VALID|ST_NOATIME}) = 0
stat("/home/sbon/Temp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/sbon/Temp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/sbon/Temp/.directory", {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
stat("/home/sbon/Temp/.directory", {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
lstat("/home/sbon/Temp", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/sbon/Temp/.directory", {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
stat("/home/sbon/Temp/.directory", {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
access("/home/sbon/Temp/.directory", W_OK) = 0
stat("/home/sbon/Temp/.directory", {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
open("/home/sbon/Temp/.directory", O_RDONLY|O_CLOEXEC) = 26
fcntl(26, F_SETFD, FD_CLOEXEC)          = 0
fstat(26, {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
fstat(26, {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
fstat(26, {st_mode=S_IFREG|0644, st_size=93, ...}) = 0
read(26, "[Desktop Entry]\nIcon=/usr/share/"..., 16384) = 93
read(26, "", 16291)                     = 0
close(26)                               = 0

Obvious the file is read.
Now:

$strace -P "/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm/" -P
"/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm/.directory" dolphin

gave me:

statfs("/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm", {f_type=FUSE_SUPER_MAGIC, f_bsize=4096,
f_blocks=18132350, f_bfree=7472874, f_bavail=6613835, f_files=49,
f_ffree=4294967246, f_fsid={val=[0, 0]}, f_namelen=255, f_frsize=4096,
f_flags=ST_VALID|ST_NOSUID|ST_NODEV|ST_NOEXEC|ST_NOATIME}) = 0
stat("/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm", {st_mode=S_IFDIR|0755, st_size=0, ...}) =
0
access("/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm", W_OK) = 0
access("/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm", W_OK) = 0
stat("/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm/.directory", {st_mode=S_IFREG|0644,
st_size=93, ...}) = 0
access("/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm/.directory", R_OK) = 0
access("/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm/.directory", W_OK) = 0
lstat("/run/fs-workspace/user/sbon/network/SFTP
Network/bononline.nl/alarm", {st_mode=S_IFDIR|0755, st_size=0, ...}) =
0

The .directory file is detected, but not opened (and nowhere futher in
the output).
What causes this? Is it the lack of f_sid (value in statfs) for the
fuse fs, or is it the directory sizes (first example they are 4096,
with fuse they are 0)?

Stef Bon




More information about the kfm-devel mailing list