assistant: Fix bug that caused v6 pointer files to be annexed by the assistant.

This commit is contained in:
Joey Hess 2016-05-16 13:36:36 -04:00
parent c61f038fc9
commit fb8ab2469d
Failed to extract signature
3 changed files with 9 additions and 1 deletions

View file

@ -221,7 +221,11 @@ shouldRestage :: DaemonStatus -> Bool
shouldRestage ds = scanComplete ds || forceRestage ds
onAddUnlocked :: Bool -> GetFileMatcher -> Handler
onAddUnlocked = onAddUnlocked' False contentchanged addassociatedfile addlink samefilestatus
onAddUnlocked symlinkssupported matcher f fs = do
mk <- liftIO $ isPointerFile f
case mk of
Nothing -> onAddUnlocked' False contentchanged addassociatedfile addlink samefilestatus symlinkssupported matcher f fs
Just k -> addlink f k
where
addassociatedfile key file =
Database.Keys.addAssociatedFile key