Skip to content

Commit a5b137e

Browse files
committed
cgofuse: use filesystem.Root instead of redefine
1 parent 76176e6 commit a5b137e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

internal/filesystem/cgofuse/translate.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ import (
1111
"github.com/winfsp/cgofuse/fuse"
1212
)
1313

14-
const (
15-
goRoot = "."
16-
errEmptyPath = generic.ConstError("path argument is empty")
17-
)
14+
const errEmptyPath = generic.ConstError("path argument is empty")
1815

1916
// fuseToGo converts a FUSE absolute path
2017
// to a relative [fs.FS] name.
@@ -30,7 +27,7 @@ func fuseToGo(path string) (string, error) {
3027
Kind: fserrors.InvalidItem,
3128
}
3229
case posixRoot:
33-
return goRoot, nil
30+
return filesystem.Root, nil
3431
}
3532

3633
// TODO: does fuse guarantee slash prefixed paths?

0 commit comments

Comments
 (0)