From 8bdfb282b961b3be6d63d20d7ec937cb39a2d291 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Wed, 25 Dec 2024 15:22:37 -0800 Subject: [PATCH] Only create directories if we are keeping images --- cv/cv.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cv/cv.go b/cv/cv.go index 1853ccb..fd6c42a 100644 --- a/cv/cv.go +++ b/cv/cv.go @@ -347,9 +347,9 @@ func (c *CVDownloader) start_downloader() { cleanup() continue } - _ = os.MkdirAll(dir, 0o755) if c.KeepDownloadedImages { + _ = os.MkdirAll(dir, 0o755) image, err := os.Create(dl.dest) if err != nil { log.Println("Unable to create image file", dl.dest, err)