summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-24 22:00:06 -0400
committerJune McEnroe <june@causal.agency>2020-08-24 22:00:06 -0400
commitb174b4d6fcb16598ed4506e3abbe9a0109d73845 (patch)
treea44e58ff54a30816e4b078e8ff37e09ef3daf46e
parentUse configOpen to load localCA (diff)
downloadpounce-b174b4d6fcb16598ed4506e3abbe9a0109d73845.tar.gz
pounce-b174b4d6fcb16598ed4506e3abbe9a0109d73845.zip
Use dataOpen for save file
Diffstat (limited to '')
-rw-r--r--bounce.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bounce.c b/bounce.c
index f1f5216..109153b 100644
--- a/bounce.c
+++ b/bounce.c
@@ -152,8 +152,8 @@ static void saveSave(void) {
 
 static void saveLoad(const char *path) {
 	umask(0066);
-	saveFile = fopen(path, "a+");
-	if (!saveFile) err(EX_CANTCREAT, "%s", path);
+	saveFile = dataOpen(path, "a+");
+	if (!saveFile) exit(EX_CANTCREAT);
 
 	int error = flock(fileno(saveFile), LOCK_EX | LOCK_NB);
 	if (error && errno != EWOULDBLOCK) err(EX_OSERR, "flock");