FR 7958 then FR 3193 at Barcelona
Cork → Barcelona → Riga
Timetable, Barcelona time
22:55FR 7958 from Cork at the gate
19:45FR 3193 to Riga leaves the gate
20 h 50 apart on the timetable, overnight
FR 3193 leaves 20 h 50 after FR 7958 arrives on the timetable: more than half a day, so not a connection we count.