From eff2e56d0d5c74ce2893e8c15577a3d25c135404 Mon Sep 17 00:00:00 2001 From: Lorenzo Bolla Date: Fri, 8 Oct 2021 11:11:17 +0200 Subject: [PATCH] Specify output filename instead of directory "temp" downloader uses its own naming for downloaded files. --- http/grab.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/http/grab.go b/http/grab.go index 3d12e0cd..f168c28c 100644 --- a/http/grab.go +++ b/http/grab.go @@ -10,7 +10,6 @@ import ( "github.com/aptly-dev/aptly/utils" "github.com/cavaliercoder/grab" "net/http" - "path/filepath" "time" "github.com/aptly-dev/aptly/aptly" @@ -75,10 +74,8 @@ func (d *GrabDownloader) log(msg string, a ...interface{}) { func (d *GrabDownloader) download(ctx context.Context, url string, destination string, expected *utils.ChecksumInfo, ignoreMismatch bool) error { // TODO clean up dest dir on permanent failure - // TODO maxTries d.log("Starting download %s -> %s\n", url, destination) - destDir := filepath.Dir(destination) - req, _ := grab.NewRequest(destDir, url) + req, _ := grab.NewRequest(destination, url) // TODO ignoreMismatch if expected != nil {