Fixed removing sub-folders when game name includes unsafe characters

This commit is contained in:
MikeMaximus
2018-07-02 09:23:39 -06:00
parent ccade84b65
commit 2ae705be18
2 changed files with 8 additions and 2 deletions
+6
View File
@@ -47,6 +47,12 @@
End Get
End Property
ReadOnly Property FileSafeName As String
Get
Return mgrPath.ValidateFileNameForOS(sName)
End Get
End Property
Property FileName As String
Get
If mgrCommon.IsUnix Then
+2 -2
View File
@@ -437,8 +437,8 @@ Public Class mgrCommon
'Check if the sub-folder is an ID or Name
If oBackup.FileName.StartsWith(oBackup.MonitorID & Path.DirectorySeparatorChar) Then
sDir = sBackupFolder & oBackup.MonitorID
ElseIf oBackup.FileName.StartsWith(oBackup.Name & Path.DirectorySeparatorChar) Then
sDir = sBackupFolder & oBackup.Name
ElseIf oBackup.FileName.StartsWith(oBackup.FileSafeName & Path.DirectorySeparatorChar) Then
sDir = sBackupFolder & oBackup.FileSafeName
Else
Exit Sub
End If