Commit 6671c5fb authored by Christian Hergert's avatar Christian Hergert
Browse files

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
parent 78a2717b
......@@ -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));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment