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

Fixed '_url with backslashes' in Windows #26

Merged
merged 1 commit into from
Jun 25, 2015

Conversation

egbertvanderhout
Copy link
Contributor

Fixes an issue in Windows where dynamic-content generates a property _url for all dynamic content. This property currently gets backslashes in stead of regular ones.

@jescalan
Copy link

Hmm... so really this is an issue with the paths roots is generating through roots.config.out(), if I'm not mistaken? This is more of a temporary patch than fixing it at the source.

Could you take a look at the output of roots.config.out(f.file, ctx.adapter.output) in this context and let me know if it's generating incorrect slashes? If so, we should make the fix in roots core instead and this problem will be fixed across all extensions 😀

@egbertvanderhout
Copy link
Contributor Author

I'm sure where roots.config.out is used for but it generates Windows-style file paths, e.g. C:\RootsProjects\MyRootsProject\pages\page-001.html. Have a look at https://gist.github.com/domenic/2790533#paths-and-urls. I guess a replace to forward slashed is needed on each place where URL's are generated. Another example: https://github.com/npm/npm-www/pull/88.

@jescalan
Copy link

Ahhh got it now. Sorry, my brain just blanked out for a minute there. That function generates correct output for windows, during the transition from output path to url, it just needs to be transformed to work on a web server which do not use windows-style paths.

Sorry I was a little slow on the uptake there, I never deal with windows so I'm not used to windows path stuff.

jescalan pushed a commit that referenced this pull request Jun 25, 2015
Fixed '_url with backslashes' in Windows
@jescalan jescalan merged commit a09cf98 into carrot:master Jun 25, 2015
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

Successfully merging this pull request may close these issues.

None yet

2 participants