Added protection against empty syncs, fiddled with upgrade again
This commit is contained in:
@@ -517,6 +517,14 @@ Public Class mgrMonitorList
|
|||||||
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
hshCompareTo = ReadList(eListTypes.FullList, mgrSQLite.Database.Local)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'Sync Wipe Protection
|
||||||
|
If hshCompareFrom.Count = 0 And hshCompareTo.Count > 0 Then
|
||||||
|
If mgrCommon.ShowMessage(mgrMonitorList_WarningSyncProtection, MsgBoxStyle.YesNo) = MsgBoxResult.No Then
|
||||||
|
RaiseEvent UpdateLog(mgrMonitorList_ErrorSyncCancel, False, ToolTipIcon.Warning, True)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
hshSyncItems = hshCompareFrom.Clone
|
hshSyncItems = hshCompareFrom.Clone
|
||||||
|
|
||||||
For Each oFromItem In hshCompareFrom.Values
|
For Each oFromItem In hshCompareFrom.Values
|
||||||
|
|||||||
@@ -828,12 +828,9 @@ Public Class mgrSQLite
|
|||||||
"DROP TABLE monitorlist; ALTER TABLE monitorlist_new RENAME TO monitorlist;"
|
"DROP TABLE monitorlist; ALTER TABLE monitorlist_new RENAME TO monitorlist;"
|
||||||
|
|
||||||
'We need to push the local game list against the remote database in case they had syncing disabled
|
'We need to push the local game list against the remote database in case they had syncing disabled
|
||||||
Dim hshMonitorList As Hashtable = mgrMonitorList.ReadList(mgrMonitorList.eListTypes.FullList, mgrSQLite.Database.Local)
|
|
||||||
Dim oSettings As New mgrSettings
|
Dim oSettings As New mgrSettings
|
||||||
oSettings.LoadSettings()
|
oSettings.LoadSettings()
|
||||||
mgrMonitorList.DoListAddUpdateSync(hshMonitorList, Database.Remote, oSettings.SyncFields)
|
mgrMonitorList.SyncMonitorLists(oSettings.SyncFields)
|
||||||
mgrTags.SyncTags(True)
|
|
||||||
mgrGameTags.SyncGameTags(True)
|
|
||||||
|
|
||||||
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, MonitorID TEXT NOT NULL, FileName TEXT NOT NULL, " &
|
sSQL &= "CREATE TABLE manifest_new (ManifestID TEXT NOT NULL PRIMARY KEY, MonitorID TEXT NOT NULL, FileName TEXT NOT NULL, " &
|
||||||
"DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
"DateUpdated TEXT NOT NULL, UpdatedBy TEXT NOT NULL, CheckSum TEXT);"
|
||||||
|
|||||||
Generated
+18
@@ -5844,6 +5844,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to The sync was aborted by the user..
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrMonitorList_ErrorSyncCancel() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrMonitorList_ErrorSyncCancel", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to Export Complete. [PARAM] item(s) have been exported..
|
''' Looks up a localized string similar to Export Complete. [PARAM] item(s) have been exported..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -5925,6 +5934,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Looks up a localized string similar to The database GBM is attempting to sync with appears to be empty, syncing with this database will delete all data. Do you still want to sync with this database? (Not Recommended).
|
||||||
|
'''</summary>
|
||||||
|
Friend ReadOnly Property mgrMonitorList_WarningSyncProtection() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("mgrMonitorList_WarningSyncProtection", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Looks up a localized string similar to There's no response from:[BR][PARAM][BR]Either the server is not responding or the URL is invalid..
|
''' Looks up a localized string similar to There's no response from:[BR][PARAM][BR]Either the server is not responding or the URL is invalid..
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@@ -2167,4 +2167,10 @@
|
|||||||
<data name="frmSettings_chkUseGameID" xml:space="preserve">
|
<data name="frmSettings_chkUseGameID" xml:space="preserve">
|
||||||
<value>Use Game ID for folder and file names</value>
|
<value>Use Game ID for folder and file names</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="mgrMonitorList_ErrorSyncCancel" xml:space="preserve">
|
||||||
|
<value>The sync was aborted by the user.</value>
|
||||||
|
</data>
|
||||||
|
<data name="mgrMonitorList_WarningSyncProtection" xml:space="preserve">
|
||||||
|
<value>The database GBM is attempting to sync with appears to be empty, syncing with this database will delete all data. Do you still want to sync with this database? (Not Recommended)</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
Reference in New Issue
Block a user