[evolution-data-server/gnome-3-22] Bug 774304 - Cover relative path in /etc/localtime symlink
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-22] Bug 774304 - Cover relative path in /etc/localtime symlink
- Date: Mon, 9 Jan 2017 18:36:54 +0000 (UTC)
commit 6aa5bfca4cf1a61435ba9a540827094be6bc765e
Author: Milan Crha <mcrha redhat com>
Date: Mon Jan 9 19:35:03 2017 +0100
Bug 774304 - Cover relative path in /etc/localtime symlink
calendar/libecal/e-cal-system-timezone.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/calendar/libecal/e-cal-system-timezone.c b/calendar/libecal/e-cal-system-timezone.c
index 81adee3..022571c 100644
--- a/calendar/libecal/e-cal-system-timezone.c
+++ b/calendar/libecal/e-cal-system-timezone.c
@@ -43,6 +43,10 @@ system_timezone_strip_path_if_valid (const gchar *filename)
{
gint skip;
+ /* In case it's a relative path the '../' references the root (from the /etc) */
+ if (filename && g_str_has_prefix (filename, "../"))
+ filename += 2;
+
if (!filename || !g_str_has_prefix (filename, SYSTEM_ZONEINFODIR "/"))
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]