From 48fb6baaaa316b1d41e14e050b0bf519232d789f Mon Sep 17 00:00:00 2001 From: Joe Reuss Date: Tue, 16 Jan 2024 16:35:51 -0600 Subject: [PATCH] Fixed issue: auto-unpacking failing if dest is . Within the auto-unpacking code, the dest was reading as just "." so I changed it to recognize that is the current working directory and change it manually --- client/handle_http.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/handle_http.go b/client/handle_http.go index 16975fc75..3787f4404 100644 --- a/client/handle_http.go +++ b/client/handle_http.go @@ -493,6 +493,12 @@ func DownloadHTTP(transfer TransferDetails, dest string, token string) (int64, e if err != nil { return 0, err } + if dest == "." { + dest, err = os.Getwd() + if err != nil { + return 0, errors.Wrap(err, "Failed to get current directory for destination") + } + } unpacker = newAutoUnpacker(dest, behavior) if req, err = grab.NewRequestToWriter(unpacker, transfer.Url.String()); err != nil { return 0, errors.Wrap(err, "Failed to create new download request")