diff options
Diffstat (limited to 'Assistant/Threads/Watcher.hs')
-rw-r--r-- | Assistant/Threads/Watcher.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Assistant/Threads/Watcher.hs b/Assistant/Threads/Watcher.hs index a74976deb..e56e47aea 100644 --- a/Assistant/Threads/Watcher.hs +++ b/Assistant/Threads/Watcher.hs @@ -178,12 +178,15 @@ onAddSymlink file filestatus = go =<< liftAnnex (Backend.lookupFile file) madeChange file LinkChange {- When a new link appears, or a link is changed, after the startup - - scan, handle getting or dropping the key's content. -} + - scan, handle getting or dropping the key's content. + - Also, moving or copying a link may caused it be be transferred + - elsewhere, so check that too. -} checkcontent key daemonstatus | scanComplete daemonstatus = do present <- liftAnnex $ inAnnex key - unless present $ - queueTransfers Next key (Just file) Download + if present + then queueTransfers Next key (Just file) Upload + else queueTransfers Next key (Just file) Download handleDrops present key (Just file) | otherwise = noop |