Only create directories if we are keeping images

This commit is contained in:
Timmy Welch 2024-12-25 15:22:37 -08:00
parent 9baa4dbc17
commit 8bdfb282b9

View File

@ -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)