mirror of
https://github.com/versity/scoutfs-go.git
synced 2026-01-03 10:35:15 +00:00
trim nulls from idtopath
This commit is contained in:
@@ -181,7 +181,9 @@ func InoToPath(dirfd *os.File, ino uint64) (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return string(res.Path[:res.PathSize]), nil
|
||||
b := bytes.Trim(res.Path[:res.PathSize], "\x00")
|
||||
|
||||
return string(b), nil
|
||||
}
|
||||
|
||||
// OpenByID will open a file by inode returning a typical *os.File
|
||||
|
||||
Reference in New Issue
Block a user