remove useless checks

the file will always be a symlink at this point
This commit is contained in:
Joey Hess 2010-10-16 21:18:21 -04:00
parent 0c0ae02838
commit 38825f4864

View file

@ -192,16 +192,10 @@ fixCmd file = notinBackend file err $ \(key, backend) -> do
gitAdd file $ Just $ "git-annex fix " ++ file gitAdd file $ Just $ "git-annex fix " ++ file
where where
checkLegal file link = do checkLegal file link = do
s <- liftIO $ getSymbolicLinkStatus file l <- liftIO $ readSymbolicLink file
force <- Annex.flagIsSet Force if (link == l)
if (not (isSymbolicLink s) && not force) then error $ "symbolic link already ok for: " ++ file
then error $ "not a symbolic link : " ++ file ++ else return ()
" (use --force to override this sanity check)"
else do
l <- liftIO $ readSymbolicLink file
if (link == l)
then error $ "symbolic link already ok for: " ++ file
else return ()
err = error $ "not annexed " ++ file err = error $ "not annexed " ++ file
{- Pushes all files to a remote repository. -} {- Pushes all files to a remote repository. -}