`br` on Windows generates incorrect ZIP archives The ZIP archive should use / internally but when on Windows `br` used \ instead. This affects the `br catalog add` command when given a directory.
Project: http://git-wip-us.apache.org/repos/asf/brooklyn-client/repo Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-client/commit/bc189ac0 Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-client/tree/bc189ac0 Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-client/diff/bc189ac0 Branch: refs/heads/master Commit: bc189ac0e69b541c1ba842adf481ca2e84b59f2a Parents: 3c599de Author: Richard Downer <rich...@apache.org> Authored: Thu Jan 11 11:11:08 2018 +0000 Committer: Richard Downer <rich...@apache.org> Committed: Thu Jan 11 11:37:43 2018 +0000 ---------------------------------------------------------------------- cli/api/catalog/catalog.go | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/brooklyn-client/blob/bc189ac0/cli/api/catalog/catalog.go ---------------------------------------------------------------------- diff --git a/cli/api/catalog/catalog.go b/cli/api/catalog/catalog.go index 5a9574f..4c985ec 100644 --- a/cli/api/catalog/catalog.go +++ b/cli/api/catalog/catalog.go @@ -193,6 +193,7 @@ func ZipResource(resource string) (*bytes.Buffer, error) { if err != nil { return err } + relativePath = strings.Replace(relativePath, "\\", "/", -1) f, err := writer.Create(relativePath) if err != nil { return err