[System.TimeZoneInfo] Fix finding system time zone when /etc/localtime has a relative...
authorPaul Gofman <gofmanp@gmail.com>
Wed, 17 Feb 2016 08:46:09 +0000 (11:46 +0300)
committerPaul Gofman <gofmanp@gmail.com>
Wed, 17 Feb 2016 09:00:41 +0000 (12:00 +0300)
mcs/class/corlib/System/TimeZoneInfo.cs

index 7a879ea317af2a69e4c2bf598bd054bed034dc29..e11e97227f738bdc5a40a46d3ff3373729d295d8 100644 (file)
@@ -120,8 +120,12 @@ namespace System
                {
                        name = null;
                        var linkPath = readlink (path);
-                       if (linkPath != null)
-                               path = linkPath;
+                       if (linkPath != null) {
+                               if (Path.IsPathRooted(linkPath))
+                                       path = linkPath;
+                               else
+                                       path = Path.Combine(Path.GetDirectoryName(path), linkPath);
+                       }
 
                        path = Path.GetFullPath (path);