diff options
author | Bastien Nocera <hadess@hadess.net> | 2021-12-13 16:59:18 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2021-12-13 16:59:18 +0100 |
commit | b15dc9f5d09a71465a4ac4990e3960c3cc466afd (patch) | |
tree | bb7d4037169f8521c07e45ae27b1d54402d635e2 | |
parent | 9dfce4fca78a86e0668500272a116613a0a973b1 (diff) | |
download | epiphany-wip/hadess/app-mode-fixes.tar.gz |
web-app-utils: Add more debug for application-mode failureswip/hadess/app-mode-fixes
Add some debug to help with debugging --application-mode failures.
-rw-r--r-- | lib/ephy-web-app-utils.c | 9 | ||||
-rw-r--r-- | src/ephy-main.c | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/ephy-web-app-utils.c b/lib/ephy-web-app-utils.c index e696be0b8..0f48d711f 100644 --- a/lib/ephy-web-app-utils.c +++ b/lib/ephy-web-app-utils.c @@ -465,9 +465,12 @@ ephy_web_application_ensure_for_app_info (GAppInfo *app_info) /* Create the profile directory, populate it. */ if (g_mkdir (profile_dir, 488) == -1) { - if (errno == EEXIST) + int err = errno; + if (err == EEXIST) return g_steal_pointer (&profile_dir); + g_debug ("Failed to create directory '%s' for app id '%s': %s (%d)", + profile_dir, id, g_strerror (err), err); return NULL; } @@ -478,7 +481,9 @@ ephy_web_application_ensure_for_app_info (GAppInfo *app_info) app_file = g_build_filename (profile_dir, ".app", NULL); fd = g_open (app_file, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (fd < 0) { - g_warning ("Failed to create .app file: %s", g_strerror (errno)); + int err = errno; + g_warning ("Failed to create .app file in '%s': %s (%d)", + profile_dir, g_strerror (err), err); return NULL; } close (fd); diff --git a/src/ephy-main.c b/src/ephy-main.c index 48b6c684b..c6225e963 100644 --- a/src/ephy-main.c +++ b/src/ephy-main.c @@ -296,6 +296,8 @@ main (int argc, if (desktop_info) profile_directory = ephy_web_application_ensure_for_app_info (G_APP_INFO (desktop_info)); + else + g_debug ("Could not instantiate GDesktopAppInfo for '%s'", desktop_file_basename); if (!profile_directory) { g_print ("Invalid desktop file passed to --application-mode\n"); |