From b1a1b40a15f6c2fc5bec219e15b6fa85fde44fde Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 7 Jan 2016 15:54:10 -0400 Subject: [PATCH] fix inverted logic in old associated files cleanup --- Database/Keys.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database/Keys.hs b/Database/Keys.hs index 38d9742df6..4c4c658508 100644 --- a/Database/Keys.hs +++ b/Database/Keys.hs @@ -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