Only create directories if we are keeping images
This commit is contained in:
parent
9baa4dbc17
commit
8bdfb282b9
2
cv/cv.go
2
cv/cv.go
@ -347,9 +347,9 @@ func (c *CVDownloader) start_downloader() {
|
|||||||
cleanup()
|
cleanup()
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
_ = os.MkdirAll(dir, 0o755)
|
|
||||||
|
|
||||||
if c.KeepDownloadedImages {
|
if c.KeepDownloadedImages {
|
||||||
|
_ = os.MkdirAll(dir, 0o755)
|
||||||
image, err := os.Create(dl.dest)
|
image, err := os.Create(dl.dest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("Unable to create image file", dl.dest, err)
|
log.Println("Unable to create image file", dl.dest, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user