[evolution-data-server/gnome-3-38] e-categories: Show migration runtime warning only if the file exists
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-38] e-categories: Show migration runtime warning only if the file exists
- Date: Fri, 27 Nov 2020 11:42:01 +0000 (UTC)
commit 4433599991c4639b2d83f5f5fb75157faa7a2dab
Author: Milan Crha <mcrha redhat com>
Date: Thu Nov 26 14:25:46 2020 +0100
e-categories: Show migration runtime warning only if the file exists
The categories migration code can fail on the first install on the machine
where was no old or new Evolution installed, but the runtime warning was
printed even in case the source file was not found, which is in most
of the cases and, more importantly, it's not a real problem when the file
is missing.
src/libedataserver/e-categories.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/libedataserver/e-categories.c b/src/libedataserver/e-categories.c
index 46bfcd0f7..1a0145486 100644
--- a/src/libedataserver/e-categories.c
+++ b/src/libedataserver/e-categories.c
@@ -140,7 +140,7 @@ build_categories_filename (void)
old_filename = g_build_filename (
g_get_home_dir (), ".evolution",
"categories.xml", NULL);
- if (g_rename (old_filename, filename) == -1) {
+ if (g_rename (old_filename, filename) == -1 && errno != ENOENT) {
g_warning ("%s: Failed to rename '%s' to '%s': %s", G_STRFUNC, old_filename,
filename, g_strerror (errno));
}
g_free (old_filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]