aboutsummaryrefslogtreecommitdiff
path: root/Assistant
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-05-16 13:36:36 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-05-16 13:36:36 -0400
commit0346651ab6ef0c53aa7e0daffd821863858081fe (patch)
tree725d6d93020a8c6827a7a686b8a614b7bd20b673 /Assistant
parentbf36bf5afdbaca9431dbb2b867f5f92a8ecdfc48 (diff)
assistant: Fix bug that caused v6 pointer files to be annexed by the assistant.
Diffstat (limited to 'Assistant')
-rw-r--r--Assistant/Threads/Watcher.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs
index 1a3acbbfd..1f50065b9 100644
--- a/Assistant/Threads/Watcher.hs
+++ b/Assistant/Threads/Watcher.hs
@@ -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