Commit d5e090ea authored by Jakob Unterwurzacher's avatar Jakob Unterwurzacher Committed by Han-Wen Nienhuys

zipfs: fix "got block count 8, want 1" test failure

Failure was:

    zipfs_test.go:74: got block count 8, want 1

This got broken by "fs: set Blksize and Blocks automatically based on Size",
fix it by setting Blksize.

Change-Id: I1d3798082b2e8a7fcda908b9b88d8b51fb11da78
parent f2ddeec4
......@@ -84,7 +84,9 @@ func (zf *zipFile) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrO
out.Atime = out.Mtime
out.Ctime = out.Mtime
out.Size = zf.file.UncompressedSize64
out.Blocks = (out.Size + 511) / 512
const bs = 512
out.Blksize = bs
out.Blocks = (out.Size + bs - 1) / bs
return 0
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment