fusefrontend: handle Readlink directly
Calling into go-fuse's loopbackFileSystem does not add any value here.
This commit is contained in:
parent
ffdb7cd47a
commit
32e55261ca
@ -253,13 +253,13 @@ func (fs *FS) StatFs(path string) *fuse.StatfsOut {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (fs *FS) Readlink(path string, context *fuse.Context) (out string, status fuse.Status) {
|
func (fs *FS) Readlink(path string, context *fuse.Context) (out string, status fuse.Status) {
|
||||||
cPath, err := fs.encryptPath(path)
|
cPath, err := fs.getBackingPath(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fuse.ToStatus(err)
|
return "", fuse.ToStatus(err)
|
||||||
}
|
}
|
||||||
cTarget, status := fs.FileSystem.Readlink(cPath, context)
|
cTarget, err := os.Readlink(cPath)
|
||||||
if status != fuse.OK {
|
if err != nil {
|
||||||
return "", status
|
return "", fuse.ToStatus(err)
|
||||||
}
|
}
|
||||||
if fs.args.PlaintextNames {
|
if fs.args.PlaintextNames {
|
||||||
return cTarget, fuse.OK
|
return cTarget, fuse.OK
|
||||||
|
Loading…
x
Reference in New Issue
Block a user