Skip to content
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

Support multiple path separator #177

Closed
Geod24 opened this issue Nov 27, 2013 · 1 comment
Closed

Support multiple path separator #177

Geod24 opened this issue Nov 27, 2013 · 1 comment

Comments

@Geod24
Copy link
Member

Geod24 commented Nov 27, 2013

Hi again,
I got the same issue with dub as I did with vibe (for the record: vibe-d/vibe.d#410 ).
But unlike in vibe, I consider this as a bug rather than a possible enhancement.

So:

root@noraj:/var/lib/jenkins/bin# /var/lib/jenkins//debug_test//build/dub/bin/dub add-local /var/lib/jenkins//debug_test/ ~master
Error: Empty path entries not allowed.

Run 'dub help' for usage information.
root@noraj:/var/lib/jenkins/bin# /var/lib/jenkins//debug_test//build/dub/bin/dub add-local /var/lib/jenkins/debug_test/ ~master
Registered package: vibe-d (version: ~master)

This is an issue when you are shell scripting, and you sometimes put more '/' than necessary, eg you don't know if the variable hold "/path/to/folder" or "/path/to/folder/".
Thanks !

@s-ludwig
Copy link
Member

It seems like you are right, at least for *NIX it seems to be ubiquitously supported. My take on it so far was to disallow it where possible (and in case of the URLRouter that probably won't change as it would require additional logic and IMO that logic is better spent in the URL rewriting routine).

The best bet seems to be to change the Path parser to ignore successive '/' (but not '') or insert '.' between them. UNC paths will have to be handled separately. That would fix DUB and allow additional slashes when using serveStaticFiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants