diff options
author | Joey Hess <joey@kitenet.net> | 2013-04-08 16:40:34 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-04-08 16:43:06 -0400 |
commit | 6c1dd46d99e96144cc843ab33441b71d784ae50d (patch) | |
tree | 208550ef2e4de2abdda8f56ba8d1c27a41e013c4 /Logs | |
parent | 42e27ceffa8ca585be4a684c43ec187121418b70 (diff) |
fix invalidating the preferred content cache when changing a group
The ConfigMonitor already did this, but groups can also be changed by eg,
the webapp UI, so need to do it at this deeper level.
Diffstat (limited to 'Logs')
-rw-r--r-- | Logs/Group.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Logs/Group.hs b/Logs/Group.hs index 85906f0a7..ee3b75b86 100644 --- a/Logs/Group.hs +++ b/Logs/Group.hs @@ -44,7 +44,12 @@ groupChange uuid@(UUID _) modifier = do showLog (unwords . S.toList) . changeLog ts uuid (modifier curr) . parseLog (Just . S.fromList . words) - Annex.changeState $ \s -> s { Annex.groupmap = Nothing } + + -- The changed group invalidates the preferred content cache. + Annex.changeState $ \s -> s + { Annex.groupmap = Nothing + , Annex.preferredcontentmap = Nothing + } groupChange NoUUID _ = error "unknown UUID; cannot modify" groupSet :: UUID -> S.Set Group -> Annex () |