Skip to content

Commit

Permalink
address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
brendandburns committed Oct 20, 2016
1 parent dba5051 commit 42dfbe1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kubectl/cmd/cp.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ func copyFromPod(f cmdutil.Factory, cmd *cobra.Command, out, cmderr io.Writer, s
}

func makeTar(filepath string, writer io.Writer) error {
// TODO: use compression here?
tarWriter := tar.NewWriter(writer)
defer tarWriter.Close()
return recursiveTar(path.Dir(filepath), path.Base(filepath), tarWriter)
Expand Down Expand Up @@ -221,6 +222,7 @@ func recursiveTar(base, file string, tw *tar.Writer) error {
}

func untarAll(reader io.Reader, destFile, prefix string) error {
// TODO: use compression here?
tarReader := tar.NewReader(reader)
for {
header, err := tarReader.Next()
Expand Down

0 comments on commit 42dfbe1

Please sign in to comment.