Skip to content

Commit 22d5ddf

Browse files
committed
ignore excluded paths when transferring files with stfp
1 parent be46f1a commit 22d5ddf

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

sdk-internals/communicator/ssh/communicator.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,15 @@ func (c *comm) sftpUploadDirSession(dst string, src string, excl []string) error
539539
if err != nil {
540540
return err
541541
}
542+
543+
// If the path is excluded, skip it
544+
for _, v := range excl {
545+
if v == relSrc {
546+
log.Printf("[DEBUG] Skipping excluded path: %s", relSrc)
547+
return nil
548+
}
549+
}
550+
542551
finalDst := filepath.Join(rootDst, relSrc)
543552

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

0 commit comments

Comments
 (0)