Only set local file name if name isn't already set
ci/woodpecker/push/woodpecker Pipeline was successful Details

This commit is contained in:
Elara 2023-10-06 15:51:37 -07:00
parent 383b886472
commit e3a838f312
1 changed files with 4 additions and 2 deletions

View File

@ -79,9 +79,11 @@ func (FileDownloader) Download(opts Options) (Type, string, error) {
if err != nil {
return 0, "", err
}
r = localFl
size = fi.Size()
name = fi.Name()
if name == "" {
name = fi.Name()
}
r = localFl
} else {
res, err := http.Get(u.String())
if err != nil {