From 53c4191350f424bd333d4975a0463fa56329e10b Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 16 Dec 2020 10:57:02 +0000 Subject: [PATCH] mount: add "." and ".." to directories to match cmount and expectations See: https://forum.rclone.org/t/empty-directorys-size-for-a-mounted-crypt-remote/21077 --- cmd/mount/dir.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmd/mount/dir.go b/cmd/mount/dir.go index 38c7eb7a7..286dd1e7b 100644 --- a/cmd/mount/dir.go +++ b/cmd/mount/dir.go @@ -107,6 +107,13 @@ func (d *Dir) ReadDirAll(ctx context.Context) (dirents []fuse.Dirent, err error) if err != nil { return nil, translateError(err) } + dirents = append(dirents, fuse.Dirent{ + Type: fuse.DT_Dir, + Name: ".", + }, fuse.Dirent{ + Type: fuse.DT_Dir, + Name: "..", + }) for _, node := range items { name := node.Name() if len(name) > mountlib.MaxLeafSize {