diff options
author | NRK <nrk@disroot.org> | 2024-06-20 12:50:19 +0200 |
---|---|---|
committer | NRK <nrk@disroot.org> | 2024-06-20 12:50:19 +0200 |
commit | 0620d473c2df34d02137fb22c23fb0f166b0e1a1 (patch) | |
tree | a20656575eb726cc62d9736a28f78d6ce581a39f /etc/nsxiv.1 | |
parent | 9b8cdcff482a518c24d31ce74524543bb7015102 (diff) | |
download | nsxiv-0620d473c2df34d02137fb22c23fb0f166b0e1a1.tar.zst |
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
Diffstat (limited to 'etc/nsxiv.1')
-rw-r--r-- | etc/nsxiv.1 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/etc/nsxiv.1 b/etc/nsxiv.1 index 5edfece..2e01302 100644 --- a/etc/nsxiv.1 +++ b/etc/nsxiv.1 @@ -124,6 +124,14 @@ as an argument, disables it instead. Enables checkerboard background for alpha layer, when given .I no as an argument, disables it instead. +.TP +.BI "\-\-cache\-allow, \-\-cache\-deny " "CACHE\-PATHS" +List of directories to whitelist or blacklist for thumbnail caching. +See +.I "THUMBNAIL CACHING" +section for more information on the argument format. +These options are mutually exclusive, if they are specified more than once then +only the final one takes effect. .SH KEYBOARD COMMANDS .SS General The following keyboard commands are available in both image and thumbnail modes: @@ -559,6 +567,24 @@ afterwards inside the cache directory to remove empty subdirectories: .RS find . \-depth \-type d \-empty ! \-name '.' \-exec rmdir {} \\; .RE +.P +The option +.BR "\-\-cache\-allow " or " \-\-cache\-deny" +may be used to whitelists or blacklist certain directories from being cached. +The argument is a +.B : +separated list of paths. A +.B * +at the beginning of the path indicates that path should be matched recursively. +.P +For example: +.B \-\-cache\-allow \(dq/user/pictures:*/media/pictures\(dq +whitelists \(dq/user/pictures\(dq directory non-recursively and \(dq/media/pictures\(dq +directory recursively. Nothing outside these two directories will be cached. +And +.B \-\-cache\-deny \(dq*/secret\(dq +will enable blacklist mode and will not cache anything inside \(dq/secret\(dq +or it's subdirectories. .SH ORIGINAL AUTHOR .EX Bert Muennich <ber.t at posteo.de> |