-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
Since it was first introduced unknown-to-us link indicators are treated as normal files:
Line 300 in d1c2689
| _ -> Normal (* if value is malformed, treat as a normal file *) |
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:
- Keep the status quo and pretend they are normal files (IMO undesirable),
- Add a
Unknown of char
constructor. This allows users to handle link indicators that are unknown to ocaml-tar. On the other hand it is a headache for writing as the user can construct e.g.Unknown '\000'
which is not actually unknown to us (legacyNormal
link indicator). - Error out on unknown-to-us link indicators. This may mean we aren't able to read some archives (incorrectly or not). I'm not sure how widespread these archives are. I am unsure how likely it is to work to pretend an unknown link indicator is a normal file. I think I prefer this option although it is a breaking change.
Metadata
Metadata
Assignees
Labels
No labels