Use target filepath instead of target dir path to upload targets (#3182)

dev
Siddharth Shashikar 2023-01-12 01:34:58 +05:30 committed by GitHub
parent e899afafdf
commit 924da4197b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -245,8 +245,8 @@ func (r *Runner) addTarget(location string) error {
if d.IsDir() || !strings.EqualFold(filepath.Ext(path), ".txt") {
return nil
}
base := filepath.Base(location)
reference, targetErr := r.cloudClient.AddTarget(base, location)
base := filepath.Base(path)
reference, targetErr := r.cloudClient.AddTarget(base, path)
if targetErr != nil {
gologger.Error().Msgf("Could not upload %s: %s", location, targetErr)
} else if reference != "" {