Skip to content

Commit

Permalink
fix double path
Browse files Browse the repository at this point in the history
Signed-off-by: Piaras Hoban <[email protected]>
  • Loading branch information
phoban01 committed Dec 12, 2023
1 parent 37be459 commit 581f5df
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/gogit/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ func Untar(in io.Reader, dir string) error {
return err
}

fp, err := sanitizeArchivePath(dir, header.Name)
abs, err := sanitizeArchivePath(dir, header.Name)
if err != nil {
return fmt.Errorf("illegal file path: %s", header.Name)
}

abs := filepath.Join(dir, fp)

switch header.Typeflag {
case tar.TypeDir:
if err := os.MkdirAll(abs, os.FileMode(header.Mode)); err != nil {
Expand Down

0 comments on commit 581f5df

Please sign in to comment.