Skip to content

Commit 2ebf717

Browse files
committed
use path instead of filepath
1 parent 5826001 commit 2ebf717

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pkg/agentfs/tar.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"mime/multipart"
2525
"net/http"
2626
"path"
27-
"path/filepath"
2827
"strings"
2928

3029
"github.com/schollz/progressbar/v3"
@@ -105,14 +104,14 @@ func UploadTarball(
105104
excludeFiles[i] = strings.TrimSpace(exclude)
106105
}
107106

108-
checkFilesToInclude := func(path string) bool {
109-
fileName := filepath.Base(path)
107+
checkFilesToInclude := func(p string) bool {
108+
fileName := path.Base(p)
110109
// we have to include the Dockerfile in the upload, as it is required for the build
111110
if strings.Contains(fileName, "Dockerfile") {
112111
return true
113112
}
114113

115-
if ignored, err := matcher.MatchesOrParentMatches(path); ignored {
114+
if ignored, err := matcher.MatchesOrParentMatches(p); ignored {
116115
return false
117116
} else if err != nil {
118117
return false

0 commit comments

Comments
 (0)