Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for copy command - from remote to local #3749

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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
Loading