about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--chat.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/chat.c b/chat.c
index 9a276d5..4f3c233 100644
--- a/chat.c
+++ b/chat.c
@@ -127,7 +127,6 @@ static void parseHash(char *str) {
 }
 
 #ifdef __OpenBSD__
-
 static void unveilData(const char *name) {
 	const char *dirs = NULL;
 	for (const char *path; NULL != (path = dataPath(&dirs, name));) {
@@ -135,16 +134,7 @@ static void unveilData(const char *name) {
 		if (error && errno != ENOENT) err(EX_CANTCREAT, "%s", path);
 	}
 }
-
-static void unveilAll(void) {
-	if (save || logEnable) {
-		dataMkdir("");
-		unveilData("");
-	}
-	if (save) unveilData(save);
-}
-
-#endif /* __OpenBSD__ */
+#endif
 
 static volatile sig_atomic_t signals[NSIG];
 static void signalHandler(int signal) {
@@ -288,7 +278,13 @@ int main(int argc, char *argv[]) {
 	uiInitEarly();
 
 #ifdef __OpenBSD__
-	if (self.restricted) unveilAll();
+	if (self.restricted) {
+		if (save || logEnable) {
+			dataMkdir("");
+			unveilData("");
+		}
+		if (save) unveilData(save);
+	}
 
 	char promises[64] = "stdio tty";
 	char *ptr = &promises[strlen(promises)], *end = &promises[sizeof(promises)];
2020-02-17Add Four Tet — HandsJune McEnroe 2020-02-12Simplify macOS notify-sendJune McEnroe 2020-02-12Add imbox and notemap to pageJune McEnroe 2020-02-12Collapse simple linksJune McEnroe 2020-02-12Move catgirl up the pageJune McEnroe 2020-02-12Update catgirl pty grabJune McEnroe 2020-02-12Link to cgit /about pages where appropriateJune McEnroe 2020-02-11Separate LINKS from BINS for html to workJune McEnroe 2020-02-11Add margin to Bl-bullet itemsJune McEnroe 2020-02-10Match URLs inside parens or with paired parens insideJune McEnroe 2020-02-10Duplicate effective URL before passing it back to curlJune McEnroe 2020-02-09Add To Be Taught, If FortunateJune McEnroe 2020-02-04Add The Future of Another TimelineJune McEnroe 2020-01-31Reorganize the Makefile for the umpteenth timeJune McEnroe 2020-01-28Change scout sensitivity to 1.4June McEnroe 2020-01-28Import shows.txtJune McEnroe