From 1a1bc30df991c396b039957581e8964dc882f256 Mon Sep 17 00:00:00 2001 From: Yannick Ulrich Date: Sun, 12 Mar 2023 12:55:44 +0000 Subject: [PATCH] Renamed device folder --- internal/fusefs/fuse.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/fusefs/fuse.go b/internal/fusefs/fuse.go index 5613150..b9f8ed0 100644 --- a/internal/fusefs/fuse.go +++ b/internal/fusefs/fuse.go @@ -103,7 +103,7 @@ func (n *ITNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno) { // root folder r := make([]fuse.DirEntry, 2) r[0] = fuse.DirEntry{ - Name: "device", + Name: "info", Ino: 0, Mode: fuse.S_IFDIR, } @@ -115,7 +115,7 @@ func (n *ITNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno) { return fs.NewListDirStream(r), 0 case 1: - // device folder + // info folder r := make([]fuse.DirEntry, 6) for ind, value := range properties { r[ind] = fuse.DirEntry{ @@ -128,7 +128,7 @@ func (n *ITNode) Readdir(ctx context.Context) (fs.DirStream, syscall.Errno) { return fs.NewListDirStream(r), 0 case 2: - // on device + // on info files, err := myfs.ReadDir(n.path) if err != nil { log.Error("FUSE ReadDir failed").Str("path", n.path).Err(err).Send() @@ -185,7 +185,7 @@ func (n *ITNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (* switch n.kind { case 0: // root folder - if name == "device" { + if name == "info" { stable := fs.StableAttr{ Mode: fuse.S_IFDIR, Ino: uint64(0), @@ -203,7 +203,7 @@ func (n *ITNode) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (* return child, 0 } case 1: - // device folder + // info folder for _, value := range properties { if value.name == name { stable := fs.StableAttr{