Merge pull request 'Merge 9-bug-editor' (#33) from 9-bug-editor into master

Reviewed-on: #33
This commit is contained in:
Adam Fordsmand 2022-04-15 20:28:47 +00:00
commit 8f95b58d9b
1 changed files with 2 additions and 2 deletions

View File

@ -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);