Don't import legacy saves if system exists in database
parent
4971ad9d42
commit
59ea469fb6
6
db/db.go
6
db/db.go
|
@ -73,6 +73,12 @@ func Init(username, password, protocol, address, database string) error {
|
||||||
continue
|
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
|
// store new system data
|
||||||
systemData, err := LegacyReadSystemSaveData(uuid)
|
systemData, err := LegacyReadSystemSaveData(uuid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue