Skip to content

Commit

Permalink
fix for copy from remote to local
Browse files Browse the repository at this point in the history
  • Loading branch information
numcys committed Nov 10, 2024
1 parent abfbd77 commit 350462b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/helpers/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ func RebaseArchive(r io.Reader, src, dst string) (io.Reader, error) {
h.Name = fmt.Sprintf("/%s", h.Name)
}

if !strings.HasPrefix(h.Name, src) {
// the second check - strings.HasSuffix(h.Name, "/") is for checking if the src provided is a single file, if it is then it should not be skipped --
if !strings.HasPrefix(h.Name, src) && strings.HasSuffix(h.Name, "/") {

Check warning on line 50 in pkg/helpers/tar.go

View check run for this annotation

Codecov / codecov/patch

pkg/helpers/tar.go#L50

Added line #L50 was not covered by tests
continue
}

Expand Down

0 comments on commit 350462b

Please sign in to comment.