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

Deal with multiple slashes in normalizedRoot #68

Closed
dblock opened this issue Feb 5, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@dblock
Copy link
Collaborator

commented Feb 5, 2017

From #64

One (simple) formatting suggestion is to remove trailing slashes from the normalizedRoot in self.loadapps(). The comments have an example where the server root ends with a slash and if included, the message says, "loaded app [hello_world] at endpoint: /alexa//hello_world."

@dblock

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 5, 2017

The better way to handle it is also to use some path combine function/library that deals with any number of slashes or relative paths.

@tejashah88

This comment has been minimized.

Copy link
Member

commented Feb 5, 2017

A simple regex replace operation would work as well. I can make a PR for that.

@dblock

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 5, 2017

There be dragons. Unicode path names, etcetera. Use node.js Path.join, http://softwareengineering.stackexchange.com/questions/267846/is-there-a-conventional-way-to-combine-file-path-strings.

@tejashah88

This comment has been minimized.

Copy link
Member

commented Feb 5, 2017

You could also use Path.normalize as well, https://nodejs.org/api/path.html#path_path_normalize_path

@dblock

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 5, 2017

If you hurry it might make it into this release :)

@tejashah88

This comment has been minimized.

Copy link
Member

commented Feb 5, 2017

Should be solved with #71

@mreinstein

This comment has been minimized.

Copy link
Contributor

commented Feb 6, 2017

If you hurry

no, please do not. :(

@tejashah88 tejashah88 self-assigned this Feb 7, 2017

@dblock dblock closed this in 2be0f02 Feb 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.