2 Commits

Author SHA1 Message Date
Jonathan Jenne
88ac9e70b2 Windream: Version 1.9.1.0 2023-03-28 13:43:46 +02:00
Jonathan Jenne
6885bd2954 Windream: Handle unc paths in NormalizePath 2023-03-28 13:43:33 +02:00
2 changed files with 14 additions and 6 deletions

View File

@@ -12,8 +12,8 @@ Imports System.Runtime.InteropServices
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("Modules.Windream")>
<Assembly: AssemblyCopyright("Copyright © 2021")>
<Assembly: AssemblyTrademark("1.7.0.0")>
<Assembly: AssemblyCopyright("Copyright © 2023")>
<Assembly: AssemblyTrademark("1.9.1.0")>
<Assembly: ComVisible(False)>
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.9.0.0")>
<Assembly: AssemblyFileVersion("1.9.0.0")>
<Assembly: AssemblyVersion("1.9.1.0")>
<Assembly: AssemblyFileVersion("1.9.1.0")>

View File

@@ -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)