From 8ee700c199f20833d59c49c2aea1fa3878ba7afa Mon Sep 17 00:00:00 2001 From: Adam Fordsmand Date: Fri, 15 Apr 2022 22:27:23 +0200 Subject: [PATCH] Fixed bug #9 --- BlogDB.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BlogDB.c b/BlogDB.c index bdb623d..c33b6e5 100644 --- a/BlogDB.c +++ b/BlogDB.c @@ -364,7 +364,7 @@ int BlogWrite(MYSQL* con) fclose(fp); char* command; - if(0 > asprintf(&command, "$EDITOR %s", tmpName)) exit(1); + if(0 > asprintf(&command, "${EDITOR:-'vi'} %s", tmpName)) exit(1); system(command); AddFilePost(1, tmpName, con); @@ -390,7 +390,7 @@ int BlogEdit(int postID, MYSQL* con) fclose(fp); char* command; - if(0 > asprintf(&command, "$EDITOR %s", tmpName)) exit(1); + if(0 > asprintf(&command, "${EDITOR:-'vi'} %s", tmpName)) exit(1); system(command); EditFilePost(tmpName, postID, con);