Skip to content

Commit

Permalink
ignore excluded paths when transferring files with stfp
Browse files Browse the repository at this point in the history
  • Loading branch information
Glyphack committed Feb 21, 2023
1 parent 27c6f65 commit afa3e93
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sdk-internals/communicator/ssh/communicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,15 @@ func (c *comm) sftpUploadDirSession(dst string, src string, excl []string) error
if err != nil {
return err
}

// If the path is excluded, skip it
for _, v := range excl {
if v == relSrc {
log.Printf("[DEBUG] Skipping excluded path: %s", relSrc)
return nil
}
}

finalDst := filepath.Join(rootDst, relSrc)

// In Windows, Join uses backslashes which we don't want to get
Expand Down

0 comments on commit afa3e93

Please sign in to comment.