On Wednesday, 2 September 2020 at 19:13:47 UTC, Adam D. Ruppe wrote:
On Wednesday, 2 September 2020 at 18:40:55 UTC, Andrey Zherikov wrote:
If I provide -Jfoo to dmd, doesn't it mean my consent to use the contents of directory foo?

Yeah, but dmd has been inconsistent on platforms about if it allows subdirectories. Right now I think it just strips all slashes out so your .\ path there just gets caught in the filter.

I think the issue is here: https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.d#L736-L748

Does it makes sense to allow paths in import(file) unless path points through parent directory, i.e. !buildNormalizedPath(file).startsWith("..")?

Reply via email to