remove useless checks
the file will always be a symlink at this point
This commit is contained in:
parent
0c0ae02838
commit
38825f4864
1 changed files with 4 additions and 10 deletions
14
Commands.hs
14
Commands.hs
|
@ -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. -}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue