diff options
-rw-r--r-- | lib/ephy-file-helpers.c | 16 | ||||
-rw-r--r-- | lib/ephy-file-helpers.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/lib/ephy-file-helpers.c b/lib/ephy-file-helpers.c index 4bbe0c974..628d3b156 100644 --- a/lib/ephy-file-helpers.c +++ b/lib/ephy-file-helpers.c @@ -62,6 +62,7 @@ static gboolean keep_directory = FALSE; static char *dot_dir = NULL; static char *tmp_dir = NULL; static GList *del_on_exit = NULL; +static gboolean is_default_dot_dir = FALSE; GQuark ephy_file_helpers_error_quark; @@ -276,6 +277,20 @@ ephy_dot_dir (void) } /** + * ephy_dot_dir_is_default: + * + * Returns whether the dot directory in use is the default one, found in + * ~/.config + * + * Returns: %TRUE if it is the default dot dir, %FALSE for others + **/ +gboolean +ephy_dot_dir_is_default (void) +{ + return is_default_dot_dir; +} + +/** * ephy_file_helpers_init: * @profile_dir: directory to use as Epiphany's profile * @flags: the %EphyFileHelpersFlags for this session @@ -340,6 +355,7 @@ ephy_file_helpers_init (const char *profile_dir, dot_dir = g_build_filename (g_get_user_config_dir (), "epiphany", NULL); + is_default_dot_dir = TRUE; } if (flags & EPHY_FILE_HELPERS_ENSURE_EXISTS) diff --git a/lib/ephy-file-helpers.h b/lib/ephy-file-helpers.h index bf52f75b6..f7564b55b 100644 --- a/lib/ephy-file-helpers.h +++ b/lib/ephy-file-helpers.h @@ -57,6 +57,7 @@ gboolean ephy_file_helpers_init (const char *profile_dir, GError **error); const char * ephy_file (const char *filename); const char * ephy_dot_dir (void); +gboolean ephy_dot_dir_is_default (void); void ephy_file_helpers_shutdown (void); char * ephy_file_get_downloads_dir (void); char * ephy_file_desktop_dir (void); |