Update for issue 31
This commit is contained in:
@@ -589,7 +589,7 @@ Public Class frmGameManager
|
||||
mgrManifest.DoManifestDelete(CurrentBackupItem, mgrSQLite.Database.Remote)
|
||||
|
||||
'Delete referenced backup file from the backup folder
|
||||
If File.Exists(BackupFolder & CurrentBackupItem.FileName) Then File.Delete(BackupFolder & CurrentBackupItem.FileName)
|
||||
If File.Exists(BackupFolder & CurrentBackupItem.FileName) Then My.Computer.FileSystem.DeleteFile(BackupFolder & CurrentBackupItem.FileName, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
|
||||
'Check if using backup sub-directories (Probably not the best way to check for this)
|
||||
If CurrentBackupItem.FileName.StartsWith(CurrentBackupItem.Name & "\") Then
|
||||
@@ -602,11 +602,11 @@ Public Class frmGameManager
|
||||
If oDir.GetDirectories.Length > 0 Or oDir.GetFiles.Length > 0 Then
|
||||
'Confirm
|
||||
If mgrCommon.ShowMessage(frmGameManager_ConfirmBackupFolderDelete, New String() {sSubDir, oDir.GetDirectories.Length, oDir.GetFiles.Length}, MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
|
||||
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir, True)
|
||||
If Directory.Exists(sSubDir) Then My.Computer.FileSystem.DeleteDirectory(sSubDir, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
End If
|
||||
Else
|
||||
'Folder is empty, delete the empty sub-folder
|
||||
If Directory.Exists(sSubDir) Then Directory.Delete(sSubDir)
|
||||
If Directory.Exists(sSubDir) Then My.Computer.FileSystem.DeleteDirectory(sSubDir, FileIO.UIOption.OnlyErrorDialogs, FileIO.RecycleOption.SendToRecycleBin)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user