add backward compatibility to exhaust path

This commit is contained in:
Benny~ 2020-03-02 21:38:55 +08:00
parent 95183ab1c3
commit 954a55adbe
No known key found for this signature in database
GPG Key ID: 6CD0DBDA5235D481

View File

@ -278,7 +278,12 @@ func main() {
confImgPath := path.Clean(config.ImgPath)
QUALITY := config.QUALITY
AllowedTypes := config.AllowedTypes
ExhaustPath := config.ExhaustPath
var ExhaustPath string
if len(config.ExhaustPath) == 0 {
ExhaustPath = "./exhaust"
} else {
ExhaustPath = config.ExhaustPath
}
if prefetch {
prefetchImages(confImgPath, ExhaustPath, QUALITY)