Skip to content

Commit ebe3110

Browse files
authored
Merge pull request dotnet-script#151 from filipw/bugfix/unc
fixed handling of UNC paths
2 parents f207721 + 1dc86b9 commit ebe3110

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptProjectProvider.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ private static string GetPathToProjectFile(string targetDirectory)
5858
if (pathRoot.Length > 0 && RuntimeHelper.IsWindows())
5959
{
6060
var driveLetter = pathRoot.Substring(0, 1);
61+
if (driveLetter == "\\")
62+
{
63+
targetDirectoryWithoutRoot = targetDirectoryWithoutRoot.TrimStart(new char[] { '\\' });
64+
driveLetter = "UNC";
65+
}
66+
6167
targetDirectoryWithoutRoot = Path.Combine(driveLetter, targetDirectoryWithoutRoot);
6268
}
6369
var pathToProjectDirectory = Path.Combine(tempDirectory, "scripts", targetDirectoryWithoutRoot);

0 commit comments

Comments
 (0)