[evolution-data-server] Bug #581508 - /usr/share/zoneinfo/ isn't being parsed correctly



commit 5858bc3887cab8e5d27254423846496272a76b34
Author: Milan Crha <mcrha redhat com>
Date:   Thu Oct 15 19:08:33 2009 +0200

    Bug #581508 - /usr/share/zoneinfo/ isn't being parsed correctly

 calendar/libecal/e-cal-system-timezone.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
---
diff --git a/calendar/libecal/e-cal-system-timezone.c b/calendar/libecal/e-cal-system-timezone.c
index c939d81..2c9abfd 100644
--- a/calendar/libecal/e-cal-system-timezone.c
+++ b/calendar/libecal/e-cal-system-timezone.c
@@ -273,7 +273,23 @@ files_are_identical_inode (struct stat *a_stat,
 			   gsize	a_content_len,
 			   const gchar  *b_filename)
 {
-	return (a_stat->st_ino == b_stat->st_ino);
+	gboolean res = a_stat->st_ino == b_stat->st_ino;
+
+	if (res) {
+		const char *filename;
+
+		filename = strrchr (b_filename, '/');
+		if (filename)
+			filename++;
+		else
+			filename = b_filename;
+
+		/* There is a 'localtime' soft link to /etc/localtime in the zoneinfo
+		   directory on Slackware, thus rather skip this file. */
+		res = !g_str_equal (filename, "localtime");
+	}
+
+	return res;
 }
 
 /* Determine if /etc/localtime is a hard link to some file, by looking at



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]