jhoonb/archivex

Use of literal "/"

tooolbox opened this issue · 2 comments

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!

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

thanks!

I have a pull request that fixes this now.