FakeTar: /var/log/postgres can't be both a folder and a file

Upstream-commit: 48974cc28d72598f0a35a4a6483b7006a1c18f9f
Component: engine
This commit is contained in:
shin-
2013-02-18 21:09:25 -08:00
parent 148e6f7d2a
commit 8fc3a40e35
+1 -1
View File
@@ -14,7 +14,7 @@ func FakeTar() (io.Reader, error) {
content := []byte("Hello world!\n")
buf := new(bytes.Buffer)
tw := tar.NewWriter(buf)
for _, name := range []string {"/etc/postgres/postgres.conf", "/etc/passwd", "/var/log/postgres", "/var/log/postgres/postgres.conf"} {
for _, name := range []string {"/etc/postgres/postgres.conf", "/etc/passwd", "/var/log/postgres/postgres.conf"} {
hdr := new(tar.Header)
hdr.Size = int64(len(content))
hdr.Name = name