Bug in import(...) on Windows?

Andrey Zherikov andrey.zherikov at gmail.com
Wed Sep 2 21:08:57 UTC 2020


On Wednesday, 2 September 2020 at 20:55:34 UTC, Andrey Zherikov 
wrote:
> I think the issue is here: 
> https://github.com/dlang/dmd/blob/master/src/dmd/root/filename.d#L736-L748

Yes, issue is there. This change (removal of "c == '\\' || ") 
fixes it:

diff --git a/src/dmd/root/filename.d b/src/dmd/root/filename.d
index 09810df8e..673582d0e 100644
--- a/src/dmd/root/filename.d
+++ b/src/dmd/root/filename.d
@@ -741,7 +741,7 @@ nothrow:
              for (const(char)* p = name; *p; p++)
              {
                  char c = *p;
-                if (c == '\\' || c == ':' || c == '%' || (c == 
'.' && p[1] == '.') || (c == '/' && p[1] == '/'))
+                if (c == ':' || c == '%' || (c == '.' && p[1] == 
'.') || (c == '/' && p[1] == '/'))
                  {
                      return null;
                  }



More information about the Digitalmars-d-learn mailing list