Skip to content

Commit

Permalink
Merge pull request #101 from open-component-model/phoban01/path-bug-fix
Browse files Browse the repository at this point in the history
Fix Path Bug
  • Loading branch information
phoban01 authored Dec 12, 2023
2 parents 37be459 + 581f5df commit 5fa4940
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 5fa4940

Please sign in to comment.