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");
7cdedf4f31a8d&follow=1'>Make sure new cap is actually larger than new lengthJune McEnroe 2022-02-20Remove unused mbs.len field from struct EditJune McEnroe 2022-02-19Remove unneeded includes in ui.cJune McEnroe 2022-02-19Reimplement tab completeJune McEnroe 2022-02-19Handle errors from editFn, etc.June McEnroe 2022-02-19Reimplement text macrosJune McEnroe 2022-02-19Factor out input handling to input.cJune McEnroe 2022-02-19Factor out window management to window.cJune McEnroe 2022-02-19Enable -Wmissing-prototypesJune McEnroe 2022-02-19Fix edit.[ch] license notice additional permissionsJune McEnroe 2022-02-19Run line editing testsJune McEnroe 2022-02-18Implement new line editing "library"June McEnroe 2022-02-18Simplify cursor positioning in inputJune McEnroe 2022-02-18Fix M-f orderingJune McEnroe 2022-02-12Move sandman build to scripts/MakefileJune McEnroe 2022-02-12Use compat_readpassphrase.c on LinuxJune McEnroe 2022-02-12Copy RPP defines from oconfigureJune McEnroe