From 0620d473c2df34d02137fb22c23fb0f166b0e1a1 Mon Sep 17 00:00:00 2001 From: NRK Date: Thu, 20 Jun 2024 10:50:19 +0000 Subject: allow {white,black}listing thumbnail cache dirs (#461) this adds the cli flags --cache-{allow,deny} along with corresponding config.h vars which allows the user to control which directories will have thumbnail cache written. this is a more general version of the `cache-whitelist` patch that existed in the nsxiv-extra repo: https://codeberg.org/nsxiv/nsxiv-extra/src/commit/21cb27cee7/patches/cache-whitelist Closes: https://codeberg.org/nsxiv/nsxiv/issues/454 --- config.def.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'config.def.h') diff --git a/config.def.h b/config.def.h index 7fbfb17..ead1509 100644 --- a/config.def.h +++ b/config.def.h @@ -70,6 +70,14 @@ static const bool ANTI_ALIAS = true; */ static const bool ALPHA_LAYER = false; +/* list of whitelisted/blacklisted directory for thumbnail cache + * (overwritten via --cache-{allow,deny} option). + * see THUMBNAIL CACHING section in nsxiv(1) manpage for more details. + */ +static const char TNS_FILTERS[] = ""; +/* set to true to treat `TNS_FILTERS` as a blacklist instead */ +static const bool TNS_FILTERS_IS_BLACKLIST = false; + #endif #ifdef INCLUDE_THUMBS_CONFIG -- cgit v1.2.3-70-g09d2