diff options
Diffstat (limited to 'rddb')
-rw-r--r-- | rddb/rddb.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/rddb/rddb.go b/rddb/rddb.go index 6c59578..45555f8 100644 --- a/rddb/rddb.go +++ b/rddb/rddb.go @@ -650,6 +650,15 @@ func (db *DB) updateCutCartTitle(cart, cut uint, groupName, sourceFile string) ( ext := strings.TrimLeft(filepath.Ext(filename), ".") filename = strings.TrimRight(strings.TrimSuffix(filename, ext), ".") + if groupName == "" { + res := db.getGroupOfCart(cart) + if res.err != nil { + result.err = res.err + return + } + groupName = res.group + } + groupDefaultTitle := "" result.err = db.getGroupDefaultTitleStmt.QueryRow(groupName).Scan(&groupDefaultTitle) if result.err != nil { |