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

Use of literal "/" #3

Closed
tooolbox opened this issue May 3, 2015 · 2 comments · Fixed by #4
Closed

Use of literal "/" #3

tooolbox opened this issue May 3, 2015 · 2 comments · Fixed by #4

Comments

@tooolbox
Copy link
Contributor

tooolbox commented May 3, 2015

Sprinkled throughout your code, you use a literal "/" instead of, for example, os.PathSeparator, or using path.Join to combine things.

This leads to some oddities. For example, when using zip.AddAll("/usr/mydir", true), your package panics because I do not have a trailing slash on my directory name: it cannot find, for example, "/usr/mydirmysubdir".

The interface that your package exposes is significantly more user-friendly than trying to use the standard zip package directly, but it would be great if you could use path.Join and such, both for cross-platform support and to avoid oddities like requiring a trailing slash on my directory name.

Thanks!

@jhoonb
Copy link
Owner

jhoonb commented May 6, 2015

ooh! good explanation!
Maybe you can send a commit?? ;)

thanks!

@tooolbox tooolbox mentioned this issue May 10, 2015
@tooolbox
Copy link
Contributor Author

I have a pull request that fixes this now.

@jhoonb jhoonb closed this as completed in #4 May 10, 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 a pull request may close this issue.

2 participants