summaryrefslogtreecommitdiff
path: root/Logs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-09-15 12:50:14 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-09-15 12:50:14 -0400
commitf30be9764801fb265d59fcde69a20b7fac21b1c6 (patch)
tree17e4a709b8d1dceec6f8d6aa9a01d41a84197c2f /Logs
parentcfe58e3b364870572bda251f4bae7e6fd415b090 (diff)
Fix bug in combination of preferred and required content settings. When one was set to the empty string and the other set to some expression, this bug caused all files to be wanted, instead of only files matching the expression.
Avoid: MAny `MOr` otherexpression Which matches anything.
Diffstat (limited to 'Logs')
-rw-r--r--Logs/PreferredContent.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Logs/PreferredContent.hs b/Logs/PreferredContent.hs
index a81c16f26..c21d67010 100644
--- a/Logs/PreferredContent.hs
+++ b/Logs/PreferredContent.hs
@@ -77,8 +77,9 @@ preferredRequiredMapsLoad = do
<$> Annex.Branch.get l
pc <- genmap preferredContentLog =<< groupPreferredContentMapRaw
rc <- genmap requiredContentLog M.empty
- -- Required content is implicitly also preferred content, so OR
- let m = M.unionWith MOr pc rc
+ -- Required content is implicitly also preferred content, so
+ -- combine.
+ let m = M.unionWith combineMatchers pc rc
Annex.changeState $ \s -> s
{ Annex.preferredcontentmap = Just m
, Annex.requiredcontentmap = Just rc