Fixed removing empty sub-folders

This commit is contained in:
MikeMaximus
2018-07-02 08:39:16 -06:00
parent 1f9dc18c49
commit 017c5def56
2 changed files with 17 additions and 9 deletions
+9 -2
View File
@@ -434,8 +434,16 @@ Public Class mgrCommon
Dim oDir As DirectoryInfo Dim oDir As DirectoryInfo
Dim sDir As String = sBackupFolder & oBackup.MonitorID Dim sDir As String = sBackupFolder & oBackup.MonitorID
'Delete sub directory if it's empty '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
ElseIf oBackup.FileName.StartsWith(oBackup.Name & Path.DirectorySeparatorChar) Then
sDir = sBackupFolder & oBackup.Name
Else
Exit Sub
End If
'Delete sub directory if it's empty
If Directory.Exists(sDir) Then If Directory.Exists(sDir) Then
'Check if there's any sub-directories or files remaining 'Check if there's any sub-directories or files remaining
oDir = New DirectoryInfo(sDir) oDir = New DirectoryInfo(sDir)
@@ -444,7 +452,6 @@ Public Class mgrCommon
If Directory.Exists(sDir) Then DeleteDirectory(sDir) If Directory.Exists(sDir) Then DeleteDirectory(sDir)
End If End If
End If End If
End If
End Sub End Sub
'Save string as text file 'Save string as text file
+2 -1
View File
@@ -14,7 +14,8 @@ All Platforms:
- "Save Multiple Backups" and "Backup Limit" are now core fields, they are synced by default and included in the Import/Export. - "Save Multiple Backups" and "Backup Limit" are now core fields, they are synced by default and included in the Import/Export.
- The Game Manager will now clean up it's own manifest when backup files are deleted outside of GBM. As to not affect performance, this only occurs when the "Backup Data" field is accessed. - The Game Manager will now clean up it's own manifest when backup files are deleted outside of GBM. As to not affect performance, this only occurs when the "Backup Data" field is accessed.
- When a single game is selected, the Game Manager now restores the currently selected backup, instead of always restoring the latest backup. - When a single game is selected, the Game Manager now restores the currently selected backup, instead of always restoring the latest backup.
- Fixed an issue that could cause the certain controls to become enabled incorrectly on the Game Manager.
- GBM now displays the full path of the detected process when multiple configurations are triggered. - GBM now displays the full path of the detected process when multiple configurations are triggered.
- Fixed an issue that could cause the certain controls to become enabled incorrectly on the Game Manager.
- Fixed an issue that caused GBM not to remove empty sub-folders unless the "Use Game ID for files and folders" setting was enabled when the folder was created.
The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html The entire version history of GBM releases is available at http://mikemaximus.github.io/gbm-web/versionhistory.html