diff options
author | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-03-15 11:21:16 -0500 |
---|---|---|
committer | Michael Catanzaro <mcatanzaro@igalia.com> | 2019-03-20 09:21:52 -0500 |
commit | 1cd0fc7fafcd185118482bee94f5f92f2d8b7260 (patch) | |
tree | a7f896370c48720a4fbd284cc69ad661457811a7 /lib | |
parent | f94b807a7ff11d5d82e067ca778f23d4bc423466 (diff) | |
download | epiphany-1cd0fc7fafcd185118482bee94f5f92f2d8b7260.tar.gz |
web-app-utils: Fix app profile dir
We migrate all existing web apps to separate profile dirs, but continue
to create new web apps in existing profile dirs... pretty big oversight,
not good. Fix it.
This also removes an old migrator that depends on this code, since it
won't work anymore. This is our oldest migrator and it's not worth
updating.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ephy-web-app-utils.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c index 01b38a2f9..fbb7554cd 100644 --- a/lib/ephy-web-app-utils.c +++ b/lib/ephy-web-app-utils.c @@ -167,18 +167,15 @@ get_app_id_from_profile_directory (const char *profile_dir) char * ephy_web_application_get_profile_directory (const char *id) { - char *dot_dir, *app_dir, *profile_dir; + g_autofree char *app_dir = NULL; + g_autofree char *profile_dir = NULL; app_dir = get_app_profile_directory_name (id); if (!app_dir) return NULL; - dot_dir = !ephy_profile_dir_is_default () ? ephy_default_profile_dir () : NULL; - profile_dir = g_build_filename (dot_dir ? dot_dir : g_get_user_data_dir (), app_dir, NULL); - g_free (app_dir); - g_free (dot_dir); - - return profile_dir; + profile_dir = g_build_filename (g_get_user_data_dir (), app_dir, NULL); + return g_steal_pointer (&profile_dir); } /** |