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

Reviewed-on: http://git.test.fordsmand.xyz/asdam9/FoCuSSG/pulls/33
This commit was merged in pull request #33.
This commit is contained in:
2022-04-15 20:28:47 +00:00

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