surf-cachedir-20200831-2188894.diff (975B)
1 From 2188894f8e6b1d2232a77b06d07776bdd6bdb4f3 Mon Sep 17 00:00:00 2001 2 From: David Carey <david@davidpcarey.com> 3 Date: Mon, 31 Aug 2020 14:03:17 -0500 4 Subject: [PATCH] Allow custom cache directory via CLI argument. 5 6 --- 7 surf.c | 6 +++++- 8 1 file changed, 5 insertions(+), 1 deletion(-) 9 10 diff --git a/surf.c b/surf.c 11 index 2b54e3c..8436ded 100644 12 --- a/surf.c 13 +++ b/surf.c 14 @@ -306,7 +306,8 @@ usage(void) 15 { 16 die("usage: surf [-bBdDfFgGiIkKmMnNpPsStTvwxX]\n" 17 "[-a cookiepolicies ] [-c cookiefile] [-C stylefile] [-e xid]\n" 18 - "[-r scriptfile] [-u useragent] [-z zoomlevel] [uri]\n"); 19 + "[-h cachedir] [-r scriptfile] [-u useragent]\n" 20 + "[-z zoomlevel] [uri]\n"); 21 } 22 23 void 24 @@ -2026,6 +2027,9 @@ main(int argc, char *argv[]) 25 defconfig[Geolocation].val.i = 1; 26 defconfig[Geolocation].prio = 2; 27 break; 28 + case 'h': 29 + cachedir = EARGF(usage()); 30 + break; 31 case 'i': 32 defconfig[LoadImages].val.i = 0; 33 defconfig[LoadImages].prio = 2; 34 -- 35 2.28.0 36