fix inverted logic in old associated files cleanup

This commit is contained in:
Joey Hess 2016-01-07 15:54:10 -04:00
parent 722f56a99d
commit b1a1b40a15
Failed to extract signature

View file

@ -173,7 +173,7 @@ addAssociatedFile' k f = queueDb $ do
-- If the same file was associated with a different key before,
-- remove that.
delete $ from $ \r -> do
where_ (r ^. AssociatedFile ==. val (getTopFilePath f) &&. r ^. AssociatedKey ==. val sk)
where_ (r ^. AssociatedFile ==. val (getTopFilePath f) &&. not_ (r ^. AssociatedKey ==. val sk))
void $ insertUnique $ Associated sk (getTopFilePath f)
where
sk = toSKey k