forked from TrueCloudLab/rclone
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:
parent
c98dd8755c
commit
e45716cac2
1 changed files with 7 additions and 0 deletions
|
@ -108,6 +108,13 @@ func (d *Dir) ReadDirAll(ctx context.Context) (dirents []fuse.Dirent, err error)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, translateError(err)
|
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 {
|
for _, node := range items {
|
||||||
name := node.Name()
|
name := node.Name()
|
||||||
if len(name) > mountlib.MaxLeafSize {
|
if len(name) > mountlib.MaxLeafSize {
|
||||||
|
|
Loading…
Add table
Reference in a new issue