Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
geanyctags: Use stdout ctags output instead of stderr on Windows
- Loading branch information
Showing
1 changed file
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,8 +113,9 @@ static void spawn_cmd(const gchar *cmd, const gchar *dir) | |
gchar *working_dir; | ||
gchar *utf8_working_dir; | ||
gchar *utf8_cmd_string; | ||
gchar *err; | ||
gchar *out, *err; | ||
gint exitcode; | ||
gboolean success; | ||
|
||
#ifndef G_OS_WIN32 | ||
/* run within shell so we can use pipes */ | ||
|
@@ -139,9 +140,13 @@ static void spawn_cmd(const gchar *cmd, const gchar *dir) | |
msgwin_msg_add(COLOR_BLUE, -1, NULL, _("%s (in directory: %s)"), utf8_cmd_string, utf8_working_dir); | ||
g_free(utf8_working_dir); | ||
g_free(utf8_cmd_string); | ||
|
||
if (!utils_spawn_sync(working_dir, argv, NULL, G_SPAWN_SEARCH_PATH, | ||
NULL, NULL, NULL, &err, &exitcode, &error) || exitcode != 0) | ||
|
||
success = utils_spawn_sync(working_dir, argv, NULL, G_SPAWN_SEARCH_PATH, | ||
NULL, NULL, &out, &err, &exitcode, &error); | ||
#ifdef G_OS_WIN32 | ||
err = out; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
techee
via email
Author
Member
|
||
#endif | ||
if (!success || exitcode != 0) | ||
{ | ||
if (error != NULL) | ||
{ | ||
|
isn't this gonna leak memory, at least if the program did output something on stderr?
Also, on non-Win32 I don't see the g_free() call on out :)