about summary refs log tree commit diff
path: root/archive.h
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-13 15:22:36 -0400
committerJune McEnroe <june@causal.agency>2020-04-13 15:22:36 -0400
commit095cc3c2fe0a8bf6bc5191db8b92325cb131fe04 (patch)
tree9ab211f65d0a9d6effc23993be1812bb694f84b9 /archive.h
parentAdd <link> elements in Atom (diff)
downloadbubger-095cc3c2fe0a8bf6bc5191db8b92325cb131fe04.tar.gz
bubger-095cc3c2fe0a8bf6bc5191db8b92325cb131fe04.zip
Rename pathMangle to pathSafe
Mangle is a rude word.
Diffstat (limited to '')
-rw-r--r--archive.h6
1 files changed, 3 insertions, 3 deletions
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;
 }