commit | 1193993c1db83ee8c0a8e86e6d41db1dd1982002 | [log] [tgz] |
---|---|---|
author | Rob Pike <r@golang.org> | Tue Sep 23 18:24:35 2014 -0700 |
committer | Rob Pike <r@golang.org> | Tue Sep 23 18:24:35 2014 -0700 |
tree | 3101a105f9401b3afdff095f13e87a3620424a76 | |
parent | db492b8df41cd90ebecaf69a73bf4cc5e0db5f20 [diff] |
cmd/pack: fix c command for existing file There were at least two bugs: 1) It would overwrite a non-archive. 2) It would truncate a non-archive and then fail. In general the file handling was too clever to be correct. Make it more straightforward, doing the creation separately from archive management. Fixes #8369. LGTM=adg, iant R=golang-codereviews, adg, iant CC=golang-codereviews https://golang.org/cl/147010046