summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cache.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/cache.c b/cache.c
index 7cdea9b..372e38d 100644
--- a/cache.c
+++ b/cache.c
@@ -12,18 +12,23 @@ const int NOLOCK = -1;
char *cache_safe_filename(const char *unsafe)
{
- static char buf[PATH_MAX];
- char *s = buf;
+ static char buf[4][PATH_MAX];
+ static int bufidx;
+ char *s;
char c;
+ bufidx++;
+ bufidx &= 3;
+ s = buf[bufidx];
+
while(unsafe && (c = *unsafe++) != 0) {
- if (c == '/' || c == ' ' || c == '&' || c == '|' ||
+ if (c == '/' || c == ' ' || c == '&' || c == '|' ||
c == '>' || c == '<' || c == '.')
c = '_';
*s++ = c;
}
*s = '\0';
- return buf;
+ return buf[bufidx];
}
int cache_exist(struct cacheitem *item)
map-go.git/commit/internal/log/log.go?id=99c5ba31e854ae25e4990313096f818b7e0367da&follow=1'>Use our own logger for debug for convenience sakeRené 'Necoro' Neumann1-2/+3 2020-04-19Fix debug logging m(René 'Necoro' Neumann1-2/+2 2020-04-19Rename util.go to log.go. Add verbose modeRené 'Necoro' Neumann4-24/+54 2020-04-19Clean go.modRené 'Necoro' Neumann2-3/+0 2020-04-19Do not print the parsedCfg anymoreRené 'Necoro' Neumann1-1/+1 2020-04-19Increase go-version to 1.14René 'Necoro' Neumann1-2/+2 2020-04-19CI: go vetRené 'Necoro' Neumann1-0/+3 2020-04-19Fetching and parsing the feedsRené 'Necoro' Neumann5-4/+113 2020-04-19Ignore all config*.ymlRené 'Necoro' Neumann1-1/+1