govips icon indicating copy to clipboard operation
govips copied to clipboard

Possible wrong logic for default configs fallbacks

Open Delicious-Bacon opened this issue 2 years ago • 0 comments

Not sure if this was intended, but checking if config.x >= 0 to set the user settings, and otherwise fallback to default would mean I could set every setting to 0*. Was this supposed to be = 0 check instead of >= 0? If 0 is unlimited, then -1 would be the fallback? 🤔

https://github.com/davidbyttow/govips/blob/19c388d12dab283becd7068b7a134740c18216b6/vips/govips.go#L110-L132

  • If I set everything as 0 I get [govips.info] vips 8.12.2 started with concurrency=16 cache_max_files=0 cache_max_mem=0 cache_max=0

Delicious-Bacon avatar Jul 17 '22 16:07 Delicious-Bacon