This commit is contained in:
Adam Fordsmand 2022-04-15 22:27:23 +02:00
parent d1fa7b26bd
commit 8ee700c199
1 changed files with 2 additions and 2 deletions

View File

@ -364,7 +364,7 @@ int BlogWrite(MYSQL* con)
fclose(fp); fclose(fp);
char* command; char* command;
if(0 > asprintf(&command, "$EDITOR %s", tmpName)) exit(1); if(0 > asprintf(&command, "${EDITOR:-'vi'} %s", tmpName)) exit(1);
system(command); system(command);
AddFilePost(1, tmpName, con); AddFilePost(1, tmpName, con);
@ -390,7 +390,7 @@ int BlogEdit(int postID, MYSQL* con)
fclose(fp); fclose(fp);
char* command; char* command;
if(0 > asprintf(&command, "$EDITOR %s", tmpName)) exit(1); if(0 > asprintf(&command, "${EDITOR:-'vi'} %s", tmpName)) exit(1);
system(command); system(command);
EditFilePost(tmpName, postID, con); EditFilePost(tmpName, postID, con);