summaryrefslogtreecommitdiff
path: root/editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'editor.c')
-rw-r--r--editor.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/editor.c b/editor.c
index 27bdecdaf3..01c644cddb 100644
--- a/editor.c
+++ b/editor.c
@@ -37,11 +37,10 @@ int launch_editor(const char *path, struct strbuf *buffer, const char *const *en
return error("Terminal is dumb, but EDITOR unset");
if (strcmp(editor, ":")) {
- const char *args[] = { editor, path, NULL };
- struct child_process p;
+ const char *args[] = { editor, real_path(path), NULL };
+ struct child_process p = CHILD_PROCESS_INIT;
int ret, sig;
- memset(&p, 0, sizeof(p));
p.argv = args;
p.env = env;
p.use_shell = 1;