diff options
author | June McEnroe <june@causal.agency> | 2020-08-24 22:00:06 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-24 22:00:06 -0400 |
commit | b174b4d6fcb16598ed4506e3abbe9a0109d73845 (patch) | |
tree | a44e58ff54a30816e4b078e8ff37e09ef3daf46e | |
parent | Use configOpen to load localCA (diff) | |
download | pounce-b174b4d6fcb16598ed4506e3abbe9a0109d73845.tar.gz pounce-b174b4d6fcb16598ed4506e3abbe9a0109d73845.zip |
Use dataOpen for save file
-rw-r--r-- | bounce.c | 4 |
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"); |