mirage / ocaml-fat

Read and write FAT format filesystems from OCaml
ISC License
26 stars 18 forks source link

Handle special dot and dotdot files #76

Closed ricarkol closed 4 years ago

ricarkol commented 6 years ago

Handle dot and dotdot special files created with other FAT implementations when walking directory trees. Noticed this when trying to walk a disk image created by mkfs.fat + mount + mkdir on my linux box using the fat binary. More specifically, tried this test https://gist.github.com/ricarkol/f72687245e143bc04ba4814c6088d13e. That test creates 41 files in 3 levels of subdirs (counting dot's and dotdot's). Without this change, only 9 files are listed, and the fat bin raises an error: "fat: a directory in the path does not exist".

Also, notice that this change doesn't complete the support for dot and dotdot special files. For example, two pending features are missing: create dot and dotdot special files on mkdir, and find files with paths like /a/b/../c.

avsm commented 5 years ago

@djs55 would you have a chance to review this so i can bundle it into the next release

ricarkol commented 5 years ago

Yaay! thanks for the review

hannesm commented 4 years ago

this was approved half a year ago, and looks fine to me. I'll just merge it :)

ricarkol commented 4 years ago

Thanks @hannesm