mirror of https://github.com/borgbackup/borg.git
fuse: fix st_blocks to be an integer (not float) value
it's basically ceil(dsize / blocksize) now (without doing floating point ops).
This commit is contained in:
parent
3a3dfcbef5
commit
81d3a4eb22
|
@ -214,7 +214,7 @@ class FuseOperations(llfuse.Operations):
|
|||
entry.st_rdev = item.get(b'rdev', 0)
|
||||
entry.st_size = size
|
||||
entry.st_blksize = 512
|
||||
entry.st_blocks = dsize / 512
|
||||
entry.st_blocks = (dsize + entry.st_blksize - 1) // entry.st_blksize
|
||||
# note: older archives only have mtime (not atime nor ctime)
|
||||
if have_fuse_xtime_ns:
|
||||
entry.st_mtime_ns = bigint_to_int(item[b'mtime'])
|
||||
|
|
Loading…
Reference in New Issue