projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Windows doesn't like quotes around "edit" when calling it through system().
[tinc]
/
src
/
tincctl.c
diff --git
a/src/tincctl.c
b/src/tincctl.c
index
f519e78
..
5f24ae4
100644
(file)
--- a/
src/tincctl.c
+++ b/
src/tincctl.c
@@
-1461,14
+1461,12
@@
static int cmd_edit(int argc, char *argv[]) {
}
}
}
}
+ char *command;
#ifndef HAVE_MINGW
#ifndef HAVE_MINGW
-
char *editor = getenv("VISUAL") ?: getenv("EDITOR") ?: "vi"
;
+
xasprintf(&command, "\"%s\" \"%s\"", getenv("VISUAL") ?: getenv("EDITOR") ?: "vi", filename)
;
#else
#else
-
char *editor = "edit"
;
+
xasprintf(&command, "edit \"%s\"", filename)
;
#endif
#endif
-
- char *command;
- xasprintf(&command, "\"%s\" \"%s\"", editor, filename);
int result = system(command);
if(result)
return result;
int result = system(command);
if(result)
return result;