On Wednesday, 2 September 2020 at 17:47:47 UTC, Adam D. Ruppe wrote:
On Wednesday, 2 September 2020 at 17:39:04 UTC, Andrey Zherikov wrote:
Is this a bug in dmd?

I think it is an old bug filed (I can't find it though) about inconsistent platform behavior but it is allowed by spec for the compiler to reject any path components.

import("") is supposed to just give a filename, no directory path.

See: https://dlang.org/spec/expression.html#import_expressions

"Implementations may restrict the file name in order to avoid directory traversal security vulnerabilities. A possible restriction might be to disallow any path components in the file name."

If I provide -Jfoo to dmd, doesn't it mean my consent to use the contents of directory foo?

Reply via email to