Don't import legacy saves if system exists in database

This commit is contained in:
maru committed 2024-05-09 05:59:48 -04:00
1 parent 4971ad9d42
commit 59ea469fb6
1 file changed
+6
+6
View File
@@ -73,6 +73,12 @@ func Init(username, password, protocol, address, database string) error {
continue
}
var count int
err = handle.QueryRow("SELECT COUNT(*) FROM systemSaveData WHERE uuid = ?", uuid).Scan(&count)
if err != nil || count != 0 {
continue
}
// store new system data
systemData, err := LegacyReadSystemSaveData(uuid)
if err != nil {