cmd/mountlib: convert time.Duration option to fs.Duration

This commit is contained in:
Nick Craig-Wood
2024-07-15 11:09:54 +01:00
parent 7c51b10d15
commit 2c57fe9826
8 changed files with 34 additions and 25 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ var _ fusefs.Node = (*File)(nil)
// Attr fills out the attributes for the file
func (f *File) Attr(ctx context.Context, a *fuse.Attr) (err error) {
defer log.Trace(f, "")("a=%+v, err=%v", a, &err)
a.Valid = f.fsys.opt.AttrTimeout
a.Valid = time.Duration(f.fsys.opt.AttrTimeout)
modTime := f.File.ModTime()
Size := uint64(f.File.Size())
Blocks := (Size + 511) / 512