Bug in import(...) on Windows?

Adam D. Ruppe destructionator at gmail.com
Wed Sep 2 17:47:47 UTC 2020

On Wednesday, 2 September 2020 at 17:39:04 UTC, Andrey Zherikov 
> 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 

More information about the Digitalmars-d-learn mailing list