Fix file downloader not returning the name of the downloaded file
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
681e5fa95b
commit
f44a9509a2
@ -134,7 +134,7 @@ func (FileDownloader) Download(opts Options) (Type, string, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if opts.PostprocDisabled {
|
if opts.PostprocDisabled {
|
||||||
return TypeFile, "", nil
|
return TypeFile, name, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = fl.Seek(0, io.SeekStart)
|
_, err = fl.Seek(0, io.SeekStart)
|
||||||
@ -144,7 +144,7 @@ func (FileDownloader) Download(opts Options) (Type, string, error) {
|
|||||||
|
|
||||||
format, r, err := archiver.Identify(name, fl)
|
format, r, err := archiver.Identify(name, fl)
|
||||||
if err == archiver.ErrNoMatch {
|
if err == archiver.ErrNoMatch {
|
||||||
return TypeFile, "", nil
|
return TypeFile, name, nil
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
return 0, "", err
|
return 0, "", err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user