cleanup daemonStatus accessors

This commit is contained in:
Joey Hess 2012-10-30 14:44:18 -04:00
parent 68118b8986
commit ea8df8fe9f
15 changed files with 29 additions and 29 deletions

View file

@ -133,18 +133,18 @@ onAddSymlink file filestatus = go =<< liftAnnex (Backend.lookupFile file)
link <- liftAnnex $ calcGitLink file key
ifM ((==) link <$> liftIO (readSymbolicLink file))
( do
s <- daemonStatus
s <- getDaemonStatus
checkcontent key s
ensurestaged link s
, do
liftIO $ removeFile file
liftIO $ createSymbolicLink link file
checkcontent key =<< daemonStatus
checkcontent key =<< getDaemonStatus
addlink link
)
go Nothing = do -- other symlink
link <- liftIO (readSymbolicLink file)
ensurestaged link =<< daemonStatus
ensurestaged link =<< getDaemonStatus
{- This is often called on symlinks that are already
- staged correctly. A symlink may have been deleted