From 4dcfeabcf0a384ab1e987f51e2815ad04f1a268a Mon Sep 17 00:00:00 2001 From: Franklin Delehelle Date: Thu, 27 Oct 2022 14:48:20 +0200 Subject: [PATCH] Fix erroneous attributes --- src/fs.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fs.rs b/src/fs.rs index 8d2326a..7f7e61e 100755 --- a/src/fs.rs +++ b/src/fs.rs @@ -904,9 +904,10 @@ impl FustaFS { .find(|sf| sf.fragment == fragment_id && sf.start == start && sf.end == end) .map(|sf| sf.attrs) .or_else(|| { + let size = (end - start) as u64; let mut attrs = FustaFS::make_file_attrs(ino, 0o444); + attrs.size = size; let sf = SubFragment::new(&fragment_id, start, end, attrs); - attrs.size = (sf.end - sf.start) as u64; self.subfragments.push(sf); Some(attrs) })