-
-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix for error in the case of UNC syntax in PATH #75
Conversation
if( path.startsWith("/") || path.startsWith("\\") ) path = path[1 .. $]; | ||
if( path.startsWith("/") || path.startsWith("\\") ) | ||
{ | ||
if( path.startsWith("\\") ) path = path[2 .. $]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be if( path.startsWith("\\\\") )
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, I'm sorry I was too hasty to commit this.
Does |
Indeed, I should have posted this as an issue instead as I haven't looked at all the consequences. Dub would fail in a later stage, but only if an UNC path is actually used. At the moment dub fails in my environment in all cases because I have an UNC path parsed by dub at startup. I have added a further fix, but it's a bit hackish and most likely there are some syntaxes not supported by it. |
Okay, thanks. I'll merge this for now and think about it some more later on (other possibilities: allow empty path entries or having an |
fix for error in the case of UNC syntax in PATH
Dub fails with the exception "Empty path entries not allowed" when there is an UNC path entry in the PATH environment variable. This is because the UNC syntax '\server\share\path' is treated as starting with an empty path entry.