[gnome-builder] ctags: place generated ctags in a subdirectory
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] ctags: place generated ctags in a subdirectory
- Date: Thu, 18 Feb 2016 21:59:37 +0000 (UTC)
commit 06ee4590d8cef4bfef66f131d55be57d9ae9278c
Author: Megh Parikh <meghprkh gmail com>
Date: Thu Feb 18 02:31:14 2016 +0530
ctags: place generated ctags in a subdirectory
This would avoid cluttering of the cache directory with project related stuff
https://bugzilla.gnome.org/show_bug.cgi?id=761391
plugins/ctags/ide-ctags-builder.c | 4 +++-
plugins/ctags/ide-ctags-service.c | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/plugins/ctags/ide-ctags-builder.c b/plugins/ctags/ide-ctags-builder.c
index 3d316c4..55eb233 100644
--- a/plugins/ctags/ide-ctags-builder.c
+++ b/plugins/ctags/ide-ctags-builder.c
@@ -132,6 +132,7 @@ ide_ctags_builder_build_worker (GTask *task,
g_autoptr(GSubprocess) process = NULL;
g_autoptr(GPtrArray) argv = NULL;
g_autofree gchar *tags_file = NULL;
+ g_autofree gchar *tags_filename = NULL;
g_autofree gchar *workpath = NULL;
g_autofree gchar *options_path = NULL;
g_autofree gchar *tagsdir = NULL;
@@ -153,10 +154,11 @@ ide_ctags_builder_build_worker (GTask *task,
project = ide_context_get_project (context);
vcs = ide_context_get_vcs (context);
workdir = g_object_ref (ide_vcs_get_working_directory (vcs));
+ tags_filename = g_strconcat (ide_project_get_id (project), ".tags", NULL);
tags_file = g_build_filename (g_get_user_cache_dir (),
ide_get_program_name (),
- ide_project_get_id (project),
"tags",
+ tags_filename,
NULL);
options_path = g_build_filename (g_get_user_config_dir (),
ide_get_program_name (),
diff --git a/plugins/ctags/ide-ctags-service.c b/plugins/ctags/ide-ctags-service.c
index 775549e..5d4598e 100644
--- a/plugins/ctags/ide-ctags-service.c
+++ b/plugins/ctags/ide-ctags-service.c
@@ -320,6 +320,7 @@ ide_ctags_service_miner (GTask *task,
GCancellable *cancellable)
{
g_autofree gchar *project_tags = NULL;
+ g_autofree gchar *filename = NULL;
IdeCtagsService *self = source_object;
IdeContext *context;
IdeProject *project;
@@ -332,13 +333,14 @@ ide_ctags_service_miner (GTask *task,
context = ide_object_get_context (IDE_OBJECT (self));
vcs = ide_context_get_vcs (context);
project = ide_context_get_project (context);
+ filename = g_strconcat (ide_project_get_id (project), ".tags", NULL);
project_tags = g_build_filename (g_get_user_cache_dir (),
ide_get_program_name (),
- ide_project_get_id (project),
"tags",
+ filename,
NULL);
- /* mine ~/.cache/gnome-builder/<name>/tags */
+ /* mine ~/.cache/gnome-builder/tags/<name>.tags */
file = g_file_new_for_path (project_tags);
ide_ctags_service_load_tags (self, file);
g_object_unref (file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]