mirage / ocaml-tar

Pure OCaml library to read and write tar files
ISC License
54 stars 34 forks source link

Link.of_char: treatment of unknown link indicators #138

Open reynir opened 9 months ago

reynir commented 9 months ago

Since it was first introduced unknown-to-us link indicators are treated as normal files: https://github.com/mirage/ocaml-tar/blob/d1c26890d2645d3db06fe6811db8e138f67ca134/lib/tar.ml#L300

Now this affects reading headers since #129 where we synthesize directory link indicators for "normal" files whose file name end with a slash - this should really only be done for headers using '0' or '\000' as link indicator.

The question is what should we do about unknown-to-us link indicators? Options that come to mind are: