This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use path.Join when setting zip.FileHeader.Name.
zip.FileHeader.Name is documented to be a '/'-separated path, rather than an os.PathSeparator-separated file system path: // Name is the name of the file. // It must be a relative path: it must not start with a drive // letter (e.g. C:) or leading slash, and only forward slashes // are allowed. Source: https://godoc.org/archive/zip#FileHeader.Name Therefore, it's correct to use path.Join rather than filepath.Join when setting its value. Package path manipulates and produces slash-separated paths, while package filepath manipulates and produces os.PathSeparator-separated file system paths. Updates #9.
- Loading branch information