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 = do
dir <- fromRepo gitAnnexSshDir
liftIO $ createDirectoryIfMissing True dir
sockets <- filter (not . isLock) <$> liftIO (dirContents dir)
sockets <- filter (not . isLock) <$>
liftIO (catchDefaultIO (dirContents dir) [])
forM_ sockets cleanup
where
cleanup socketfile = do