Fixed directory rename bug
This commit is contained in:
@@ -109,14 +109,9 @@ Public Class mgrPath
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Shared Function ValidateForFileSystem(ByVal sCheckString As String) As String
|
Public Shared Function ValidateForFileSystem(ByVal sCheckString As String) As String
|
||||||
Dim cInvalidFileCharacters As Char() = Path.GetInvalidFileNameChars
|
Dim cInvalidCharacters As Char() = {"\", "/", ":", "*", "?", """", "<", ">", "|", "."}
|
||||||
Dim cInvalidPathCharacters As Char() = Path.GetInvalidPathChars
|
|
||||||
|
|
||||||
For Each c As Char In cInvalidFileCharacters
|
For Each c As Char In cInvalidCharacters
|
||||||
sCheckString = sCheckString.Replace(c, "")
|
|
||||||
Next
|
|
||||||
|
|
||||||
For Each c As Char In cInvalidPathCharacters
|
|
||||||
sCheckString = sCheckString.Replace(c, "")
|
sCheckString = sCheckString.Replace(c, "")
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user