diff --git a/Windream/Windream.vb b/Windream/Windream.vb index 71bcec9e..c2380c38 100644 --- a/Windream/Windream.vb +++ b/Windream/Windream.vb @@ -849,8 +849,16 @@ Public Class Windream If IsPathRooted(oNormalizedPath) Then ' This breaks because it converts the path "\SomeFolder" into "C:\SomeFolder" LOL 'oNormalizedPath = GetFullPath(oNormalizedPath) - ' Lets just be pragmatic here - oNormalizedPath = oNormalizedPath.Replace("\\", "\") + + ' If path is a UNC path, exclude the first double backslashes while replacing + If oNormalizedPath.StartsWith("\\") Then + _logger.Debug("Path looks like a UNC Path") + oNormalizedPath = "\\" & oNormalizedPath.Substring(2).Replace("\\", "\") + Else + oNormalizedPath = oNormalizedPath.Replace("\\", "\") + End If + + ' Replace forward slashes oNormalizedPath = oNormalizedPath.Replace("/", "\") _logger.Debug("Path after converting slashes: [{0}]", oNormalizedPath)