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 Get
End Property End Property
ReadOnly Property FileSafeName As String
Get
Return mgrPath.ValidateFileNameForOS(sName)
End Get
End Property
Property FileName As String Property FileName As String
Get Get
If mgrCommon.IsUnix Then 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 'Check if the sub-folder is an ID or Name
If oBackup.FileName.StartsWith(oBackup.MonitorID & Path.DirectorySeparatorChar) Then If oBackup.FileName.StartsWith(oBackup.MonitorID & Path.DirectorySeparatorChar) Then
sDir = sBackupFolder & oBackup.MonitorID sDir = sBackupFolder & oBackup.MonitorID
ElseIf oBackup.FileName.StartsWith(oBackup.Name & Path.DirectorySeparatorChar) Then ElseIf oBackup.FileName.StartsWith(oBackup.FileSafeName & Path.DirectorySeparatorChar) Then
sDir = sBackupFolder & oBackup.Name sDir = sBackupFolder & oBackup.FileSafeName
Else Else
Exit Sub Exit Sub
End If End If