[epiphany/wip/tingping/profile-migration: 4/7] migrator: Use warnings on errors
- From: Patrick Griffis <pgriffis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/tingping/profile-migration: 4/7] migrator: Use warnings on errors
- Date: Sun, 6 Jan 2019 18:34:36 +0000 (UTC)
commit 5061ff77917d17b5f38cb9234a8f4ba474615ef3
Author: Patrick Griffis <pgriffis igalia com>
Date: Fri Dec 21 18:03:30 2018 -0500
migrator: Use warnings on errors
src/profile-migrator/ephy-profile-migrator.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/profile-migrator/ephy-profile-migrator.c b/src/profile-migrator/ephy-profile-migrator.c
index 159bcac20..b612d1afa 100644
--- a/src/profile-migrator/ephy-profile-migrator.c
+++ b/src/profile-migrator/ephy-profile-migrator.c
@@ -1261,7 +1261,7 @@ move_directory_contents (GFile *source,
G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
NULL, &error);
if (error) {
- LOG ("Failed to enumerate files: %s", error->message);
+ g_warning ("Failed to enumerate files: %s", error->message);
return FALSE;
}
@@ -1269,7 +1269,7 @@ move_directory_contents (GFile *source,
GFileInfo *info;
g_autoptr(GError) error = NULL;
if (!g_file_enumerator_iterate (direnum, &info, NULL, NULL, &error)) {
- LOG ("Failed to enumerate dir: %s", error->message);
+ g_warning ("Failed to enumerate dir: %s", error->message);
return FALSE;
}
if (!info)
@@ -1278,13 +1278,13 @@ move_directory_contents (GFile *source,
g_autoptr(GFile) source_f = g_file_get_child (source, g_file_info_get_name (info));
g_autoptr(GFile) dest_f = g_file_get_child (dest, g_file_info_get_name (info));
if (!g_file_move (source_f, dest_f, G_FILE_COPY_NONE, NULL, NULL, NULL, &error)) {
- LOG ("Failed to move %s: %s", g_file_info_get_name (info), error->message);
+ g_warning ("Failed to move %s: %s", g_file_info_get_name (info), error->message);
return FALSE;
}
}
if (!g_file_delete (source, NULL, &error))
- LOG ("Failed to delete left-over source: %s", error->message);
+ g_warning ("Failed to delete left-over source: %s", error->message);
return TRUE;
}
@@ -1315,7 +1315,7 @@ migrate_profile_directories (void)
g_autofree char *app_file = g_build_filename (app_path, ".app", NULL);
int fd = g_open (app_file, O_WRONLY|O_CREAT|O_TRUNC, 0644);
if (fd < 0)
- LOG ("Failed to create .app file: %s", g_strerror (errno));
+ g_warning ("Failed to create .app file: %s", g_strerror (errno));
else
close (fd);
@@ -1324,7 +1324,7 @@ migrate_profile_directories (void)
g_key_file_load_from_file (file, desktop_file_path, G_KEY_FILE_NONE, NULL);
g_autofree char *exec = g_key_file_get_string (file, G_KEY_FILE_DESKTOP_GROUP,
G_KEY_FILE_DESKTOP_KEY_EXEC, &error);
if (exec == NULL) {
- LOG ("Failed to get Exec key from %s: %s", desktop_file_path, error->message);
+ g_warning ("Failed to get Exec key from %s: %s", desktop_file_path, error->message);
continue;
}
@@ -1332,7 +1332,7 @@ migrate_profile_directories (void)
g_autofree char *new_exec = g_regex_replace (re, exec, -1, 0, "epiphany-", 0, &error);
if (error != NULL) {
- LOG ("Failed to replace Exec line %s: %s", exec, error->message);
+ g_warning ("Failed to replace Exec line %s: %s", exec, error->message);
g_clear_error (&error);
}
@@ -1340,7 +1340,7 @@ migrate_profile_directories (void)
g_key_file_set_string (file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_EXEC, new_exec);
if (!g_key_file_save_to_file (file, desktop_file_path, &error))
- LOG ("Failed to save desktop file %s", error->message);
+ g_warning ("Failed to save desktop file %s", error->message);
g_autofree char *desktop_symlink_path = g_build_filename (g_get_user_data_dir (),
"applications",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]