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

embed-go filename generation breaks for relative paths #67

Closed
cortesi opened this issue Oct 20, 2015 · 0 comments · Fixed by #68
Closed

embed-go filename generation breaks for relative paths #67

cortesi opened this issue Oct 20, 2015 · 0 comments · Fixed by #68

Comments

@cortesi
Copy link
Contributor

cortesi commented Oct 20, 2015

File names for embedded boxes are generated with the following code:

boxFilename := strings.Replace(boxname, "/", "-", -1)
boxFilename = strings.Replace(boxFilename, "..", "back", -1)
boxFilename = boxFilename + `.rice-box.go`

This breaks for relative paths. For instance, the path "./static" will become ".-static.rice-box.go". Note the leading period. Hidden files are ignored by go build, and the box is not included in the binary. The method also breaks in a variety of rare corner cases, like the presence of directories named "back".

This problem is a complicating factor in issue #66 - the example I gave there is actually this bug, not a cross-compilation issue.

I have a pull request inbound that fixes this problem.

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 a pull request may close this issue.

1 participant