Don't import legacy saves if system exists in database

pull/5/head
maru 2024-05-09 05:59:48 -04:00
parent 4971ad9d42
commit 59ea469fb6
No known key found for this signature in database
GPG Key ID: 37689350E9CD0F0D
1 changed files with 6 additions and 0 deletions

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 {