close transation if there's one open im handlefolder

This commit is contained in:
sentriz
2019-07-24 11:10:05 +01:00
parent e684c468da
commit bef842ff4b

View File

@@ -244,6 +244,13 @@ func decoded(in string) string {
// ## begin handlers
func (s *Scanner) handleFolder(it *item) error {
if s.trTxOpen {
// a transaction still being open when we handle a folder can
// happen if there is a folder that contains /both/ tracks and
// sub folders
s.trTx.Commit()
s.trTxOpen = false
}
folder := &model.Album{}
defer func() {
// folder's id will come from early return