From 41eec2fc98c3fe06b3646d213f02dca6e35e5a2f Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sun, 17 Nov 2024 21:11:54 +0300 Subject: [PATCH] fix: use MkdirAll instead Mkdir to ignore existing dirs --- internal/dl/file.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/dl/file.go b/internal/dl/file.go index a3da657..a98d07a 100644 --- a/internal/dl/file.go +++ b/internal/dl/file.go @@ -222,7 +222,7 @@ func extractFile(r io.Reader, format archiver.Format, name string, opts Options) } if f.IsDir() { - err = os.Mkdir(path, 0o755) + err = os.MkdirAll(path, 0o755) if err != nil { return err } @@ -279,4 +279,4 @@ func getFilename(res *http.Response) (name string) { } else { return path.Base(res.Request.URL.Path) } -} \ No newline at end of file +}