From b174b4d6fcb16598ed4506e3abbe9a0109d73845 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 24 Aug 2020 22:00:06 -0400 Subject: Use dataOpen for save file --- bounce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bounce.c') 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"); -- cgit 1.4.1