Fixed a not equal condition in addAssociatedFile.

This commit is contained in:
Sean Parsons 2018-11-06 22:50:00 +00:00
parent 42bdc9fa2f
commit ef5a735d47

View file

@ -62,7 +62,7 @@ addAssociatedFile :: IKey -> TopFilePath -> WriteHandle -> IO ()
addAssociatedFile ik f = queueDb $ do
-- If the same file was associated with a different key before,
-- remove that.
deleteWhere [AssociatedFile ==. af, AssociatedKey ==. ik]
deleteWhere [AssociatedFile ==. af, AssociatedKey !=. ik]
void $ insertUnique $ Associated ik af
where
af = toSFilePath (getTopFilePath f)