syscall optimisation

This commit is contained in:
Joey Hess 2012-03-06 13:56:20 -04:00
parent cd6fd4a1d1
commit d08ee1a9d2

View file

@ -61,8 +61,8 @@ portParams (Just port) = [Param "-p", Param $ show port]
sshCleanup :: Annex () sshCleanup :: Annex ()
sshCleanup = do sshCleanup = do
dir <- fromRepo gitAnnexSshDir dir <- fromRepo gitAnnexSshDir
liftIO $ createDirectoryIfMissing True dir sockets <- filter (not . isLock) <$>
sockets <- filter (not . isLock) <$> liftIO (dirContents dir) liftIO (catchDefaultIO (dirContents dir) [])
forM_ sockets cleanup forM_ sockets cleanup
where where
cleanup socketfile = do cleanup socketfile = do