trim nulls from idtopath

This commit is contained in:
Ben McClelland
2019-01-18 21:06:09 -08:00
parent 47c3958c49
commit 7074d96d13

View File

@@ -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