summaryrefslogtreecommitdiff
path: root/src/Storage
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-10-07 21:56:36 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-10-09 22:00:38 +0200
commit967cb4587c1af9fb53bfd1a30d007877d16e03fa (patch)
treeede4755a8adede182be60583127a2e4b59b4830a /src/Storage
parentee9ab16d4c1f85cdc1582edfbeb7d61f291b7c35 (diff)
Storage: handle BASE/SBASE references as parents
Diffstat (limited to 'src/Storage')
-rw-r--r--src/Storage/Merge.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Storage/Merge.hs b/src/Storage/Merge.hs
index 02b29f7..7c6992f 100644
--- a/src/Storage/Merge.hs
+++ b/src/Storage/Merge.hs
@@ -57,11 +57,11 @@ previous (Stored ref _) = case load ref of
Rec items | Just (RecRef dref) <- lookup (BC.pack "SDATA") items
, Rec ditems <- load dref ->
map wrappedLoad $ catMaybes $ map (\case RecRef r -> Just r; _ -> Nothing) $
- map snd $ filter ((== BC.pack "SPREV") . fst) ditems
+ map snd $ filter ((`elem` [ BC.pack "SPREV", BC.pack "SBASE" ]) . fst) ditems
| otherwise ->
map wrappedLoad $ catMaybes $ map (\case RecRef r -> Just r; _ -> Nothing) $
- map snd $ filter ((== BC.pack "PREV") . fst) items
+ map snd $ filter ((`elem` [ BC.pack "PREV", BC.pack "BASE" ]) . fst) items
_ -> []