dsheets / codoc

OCaml documentation generator
34 stars 5 forks source link

do not strip pkg_dir in extract folder #96

Closed ivg closed 8 years ago

ivg commented 8 years ago

It is not obvious when we really need to strip the _build/ prefix, but stripping is definitely made under the assumption that the pkg_dir starts with _build/. This assumption might not hold. Issue #94 demonstrates it. To fix #94 it is proposed to apply the stripping only if pkg_dir indeed starts with _build.

It is possible, that a better solution would be to strip _build if the pkg_dir starts with _build without checking the list of extractables. Or even don't strip if it is not needed.

dsheets commented 8 years ago

The reason that _build is stripped is so that ocamlbuild style projects can have documentation paths that match module paths as _build mirrors the source hierarchy in these circumstances.

Thanks for the patch!