From 095cc3c2fe0a8bf6bc5191db8b92325cb131fe04 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 13 Apr 2020 15:22:36 -0400 Subject: Rename pathMangle to pathSafe Mangle is a rude word. --- archive.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'archive.h') diff --git a/archive.h b/archive.h index 749ab1b..7c6751d 100644 --- a/archive.h +++ b/archive.h @@ -149,7 +149,7 @@ static inline const char *pathUID(uint32_t uid, const char *type) { return buf; } -static inline const char *pathMangle(const char *messageID) { +static inline const char *pathSafe(const char *messageID) { if (!strchr(messageID, '/')) return messageID; static char buf[PATH_MAX]; strlcpy(buf, messageID, sizeof(buf)); @@ -161,13 +161,13 @@ static inline const char *pathMangle(const char *messageID) { static inline const char *pathMessage(const char *messageID, const char *type) { static char buf[PATH_MAX]; - snprintf(buf, sizeof(buf), "message/%s.%s", pathMangle(messageID), type); + snprintf(buf, sizeof(buf), "message/%s.%s", pathSafe(messageID), type); return buf; } static inline const char *pathThread(const char *messageID, const char *type) { static char buf[PATH_MAX]; - snprintf(buf, sizeof(buf), "thread/%s.%s", pathMangle(messageID), type); + snprintf(buf, sizeof(buf), "thread/%s.%s", pathSafe(messageID), type); return buf; } -- cgit 1.4.1