From 22b4efb1411caa79e63e120b9d2f44b44aa0d994 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Techet?= Date: Sun, 6 May 2018 19:55:57 +0200 Subject: [PATCH] geanyctags: Add apostrophes around generated tags file This should fix problems when the project file (and as a result the tags file too) contains spaces. Fixes the geany-plugins part of #738 --- geanyctags/src/geanyctags.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/geanyctags/src/geanyctags.c b/geanyctags/src/geanyctags.c index 66ac43d22..7890e79f5 100644 --- a/geanyctags/src/geanyctags.c +++ b/geanyctags/src/geanyctags.c @@ -221,8 +221,8 @@ on_generate_tags(GtkMenuItem *menuitem, gpointer user_data) #ifndef G_OS_WIN32 gchar *find_string = generate_find_string(prj); cmd = g_strconcat(find_string, - " | ctags --totals --fields=fKsSt --extra=-fq --c-kinds=+p --sort=foldcase --excmd=number -L - -f ", - tag_filename, NULL); + " | ctags --totals --fields=fKsSt --extra=-fq --c-kinds=+p --sort=foldcase --excmd=number -L - -f '", + tag_filename, "'", NULL); g_free(find_string); #else /* We don't have find and | on windows, generate tags for all files in the project (-R recursively) */ @@ -232,8 +232,8 @@ on_generate_tags(GtkMenuItem *menuitem, gpointer user_data) * refuses to overwrite it. Therefore, we need to delete the tags file manually. */ g_unlink(tag_filename); - cmd = g_strconcat("ctags.exe -R --totals --fields=fKsSt --extra=-fq --c-kinds=+p --sort=foldcase --excmd=number -f ", - tag_filename, NULL); + cmd = g_strconcat("ctags.exe -R --totals --fields=fKsSt --extra=-fq --c-kinds=+p --sort=foldcase --excmd=number -f \"", + tag_filename, "\"", NULL); #endif spawn_cmd(cmd, prj->base_path);