Skip to content

Commit

Permalink
Fix erroneous attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
delehef committed Oct 27, 2022
1 parent 059fa33 commit 4dcfeab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down

0 comments on commit 4dcfeab

Please sign in to comment.