Implement file canonicalization, i.e. storing the real path for the file opened.
something like /devices/../devices/ will become just /devices
Related issue
Fixes #94
Changes
Changed the mapping structure in the filesystem from Vec<(path_prefix, filesystem)> to a tree structure, where starting from / (root), each child is just one path component, something like
- / (fs)
- devices (fs)
- mounted2 (fs)
this will be 3 mounting points, /, /devices, /mounted2
implementing canonicalization on open_inode, which treverses and keep track of where we are right now, then uses the final path when storing it along the File or Directory structs
Checklist
[x] The changes are tested and works as expected (mention if not)
[ ] Tests if applicable (new features, regression tests, etc...) TODO
Summary
Implement file canonicalization, i.e. storing the real path for the file opened.
something like
/devices/../devices/
will become just/devices
Related issue
Fixes #94
Changes
mapping
structure in the filesystem fromVec<(path_prefix, filesystem)>
to a tree structure, where starting from/
(root), each child is just one path component, something likethis will be 3 mounting points,
/
,/devices
,/mounted2
open_inode
, which treverses and keep track of where we are right now, then uses the final path when storing it along theFile
orDirectory
structsChecklist