1
mirror of https://github.com/rclone/rclone synced 2024-11-19 20:07:15 +01:00

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
This commit is contained in:
Nick Craig-Wood 2020-12-16 10:57:02 +00:00
parent c98dd8755c
commit e45716cac2

View File

@ -108,6 +108,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 {