- Use the correct absolute path for relative paths within a rooted path
authorMarcus von Appen <mva@sysfault.org>
Thu, 27 Feb 2014 19:48:26 +0000 (20:48 +0100)
committerMarcus von Appen <mva@sysfault.org>
Thu, 27 Feb 2014 19:48:26 +0000 (20:48 +0100)
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/DirectoryScanner.cs

index 4636d27250bc0a3af4b424480f6a70fde89266d3..4e8aa9a340c11eed300c2124174818cdadf26dcf 100644 (file)
@@ -98,7 +98,9 @@ namespace Microsoft.Build.BuildEngine {
                                int offset = 0;
                                string full_path;
                                if (Path.IsPathRooted (name)) {
-                                       full_path = name;
+                                       // The path may start with a root indicator, but at the same time can
+                                       // contain relative paths inbetween
+                                       full_path = Path.GetFullPath (name);
                                        baseDirectory = new DirectoryInfo (Path.GetPathRoot (name));
                                        if (IsRunningOnWindows)
                                                // skip the "drive:"