[gnome-builder/gnome-builder-3-36] recent: track projects within projects directory
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-36] recent: track projects within projects directory
- Date: Wed, 24 Jun 2020 18:38:03 +0000 (UTC)
commit 5a9856e27ea21c01b46d944c2068a0c77e569473
Author: Christian Hergert <chergert redhat com>
Date: Mon May 11 15:33:56 2020 -0700
recent: track projects within projects directory
This may be in a directory that is not a child of the home directory. We
should track those as well.
Fixes #1207
src/plugins/recent/gbp-recent-workbench-addin.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/plugins/recent/gbp-recent-workbench-addin.c b/src/plugins/recent/gbp-recent-workbench-addin.c
index f97327c1a..262fa5bd6 100644
--- a/src/plugins/recent/gbp-recent-workbench-addin.c
+++ b/src/plugins/recent/gbp-recent-workbench-addin.c
@@ -41,15 +41,18 @@ directory_is_ignored (GFile *file)
g_autofree gchar *relative_path = NULL;
g_autoptr(GFile) downloads_dir = NULL;
g_autoptr(GFile) home_dir = NULL;
+ g_autoptr(GFile) projects_dir = NULL;
GFileType file_type;
g_assert (G_IS_FILE (file));
+ projects_dir = g_file_new_for_path (ide_get_projects_dir ());
home_dir = g_file_new_for_path (g_get_home_dir ());
relative_path = g_file_get_relative_path (home_dir, file);
file_type = g_file_query_file_type (file, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, NULL);
- if (!g_file_has_prefix (file, home_dir))
+ if (!g_file_has_prefix (file, home_dir) &&
+ !g_file_has_prefix (file, projects_dir))
return TRUE;
downloads_dir = g_file_new_for_path (g_get_user_special_dir (G_USER_DIRECTORY_DOWNLOAD));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]