jobs ack fix
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ycc
2026-02-28 21:04:13 +01:00
parent 67823237e6
commit cd9ee54f6d
4 changed files with 390 additions and 68 deletions

View File

@@ -2,6 +2,7 @@ package client
import (
"database/sql"
"fmt"
"math"
"os"
"path/filepath"
@@ -256,8 +257,9 @@ func GetDbMessage(dbFile string, dbId int64, password string) (*meowlib.DbMessag
}
defer rows.Close()
var dbm meowlib.DbMessage
found := false
for rows.Next() {
found = true
var id int64
var m []byte
err = rows.Scan(&id, &m)
@@ -272,7 +274,9 @@ func GetDbMessage(dbFile string, dbId int64, password string) (*meowlib.DbMessag
if err != nil {
return nil, err
}
}
if !found {
return nil, fmt.Errorf("message row %d not found in %s", dbId, dbFile)
}
return &dbm, nil
}