diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-24 13:46:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-24 13:46:10 -0400 |
commit | e58d19b53378b93818620518ddbc09a0c3a895dd (patch) | |
tree | 528bcbffecf4fac563ca637b17ed3ce70590878a /Assistant/ScanRemotes.hs | |
parent | 9fafddc7eb320e9399c586a901936383abb3fa4d (diff) |
run full transfer scan on all remotes at startup
Or when a remote first becomes available after startup.
Diffstat (limited to 'Assistant/ScanRemotes.hs')
-rw-r--r-- | Assistant/ScanRemotes.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Assistant/ScanRemotes.hs b/Assistant/ScanRemotes.hs index 637522196..85a29584e 100644 --- a/Assistant/ScanRemotes.hs +++ b/Assistant/ScanRemotes.hs @@ -41,9 +41,9 @@ getScanRemote v = atomically $ do return ret {- Adds new remotes that need scanning to the map. -} -addScanRemotes :: ScanRemoteMap -> [Remote] -> Bool -> IO () -addScanRemotes _ [] _ = noop -addScanRemotes v rs full = atomically $ do +addScanRemotes :: ScanRemoteMap -> Bool -> [Remote] -> IO () +addScanRemotes _ _ [] = noop +addScanRemotes v full rs = atomically $ do m <- fromMaybe M.empty <$> tryTakeTMVar v putTMVar v $ M.unionWith merge (M.fromList $ zip rs (map info rs)) m where |