From a3a92b330d11737fbc46a5af4ed16190f4291d7c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 7 Jan 2016 15:54:10 -0400 Subject: fix inverted logic in old associated files cleanup --- Database/Keys.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Database') diff --git a/Database/Keys.hs b/Database/Keys.hs index 38d9742df..4c4c65850 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 -- cgit v1.2.3