Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <[email protected]>
  • Loading branch information
natalieparellano authored Sep 30, 2021
1 parent 287636b commit c8addc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion archive/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type PathMode struct {
}

// Extract reads all entries from TarReader and extracts them to the filesystem.
// The umask must be unset before calling this function on unix, to ensure that files have the correct file mode.
// The umask must be unset before calling this function on unix, to ensure that files have the correct file mode. SetUmask can be used to set and unset the umask.
// The provided umask will be applied to new directories that are created as parent directories of files in the tar, that do not themselves have headers in the tar.
func Extract(tr TarReader, procUmask int) error {
buf := make([]byte, 32*32*1024)
Expand Down
2 changes: 1 addition & 1 deletion layers/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
// Extract extracts entries from r to the dest directory
// Contents of r should be an OCI layer.
// If dest is an empty string files with be extracted to `/` or `c:\` on unix and windows filesystems respectively.
// The umask must be unset before calling this function on unix, to ensure that files have the correct file mode.
// The umask must be unset before calling this function on unix, to ensure that files have the correct file mode. SetUmask can be used to set and unset the umask.
// The provided umask will be applied to new directories that are created as parent directories of files in the tar, that do not themselves have headers in the tar.
func Extract(r io.Reader, dest string, procUmask int) error {
tr := tarReader(r, dest)
Expand Down

0 comments on commit c8addc4

Please sign in to comment.