diff --git a/pkg/build/gcloud/storage/gsutil.go b/pkg/build/gcloud/storage/gsutil.go index ca3484c5df7..461fd58c98a 100644 --- a/pkg/build/gcloud/storage/gsutil.go +++ b/pkg/build/gcloud/storage/gsutil.go @@ -268,8 +268,9 @@ func ListLocalFiles(dir string) ([]File, error) { err := filepath.Walk(dir, func(path string, info os.FileInfo, err error) error { if !info.IsDir() { files = append(files, File{ - FullPath: path, - PathTrimmed: info.Name(), + FullPath: path, + // Strip the dir name from the filepath + PathTrimmed: strings.ReplaceAll(path, dir, ""), }) } return nil