[Issue 21227] import(".\\file") doesn't work on Windows

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 6 15:30:04 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=21227

--- Comment #2 from Andrey Zherikov <andrey.zherikov at gmail.com> ---
(In reply to moonlightsentinel from comment #1)
> Plainly allowing is not the right fix (given the contract of the function)
> because it allows to write absolute paths:
> 
> Try e.g.:
> 
> pragma(msg, import(`\papth\to\dmd\README.md`));

Whether to allow absolute path or not is a separate question and I agree with
denying them. The issue here is in rejecting the valid path character.

Another issue here is that error message is useless because it doesn't shed any
light why file ".\file" can't be found although it exists for sure.

--


More information about the Digitalmars-d-bugs mailing list