key conversion back from file bugfixes

This commit is contained in:
Joey Hess 2010-10-13 03:41:12 -04:00
parent cc5cf0093e
commit 99b2029236
3 changed files with 21 additions and 18 deletions

View file

@ -87,10 +87,8 @@ annexFile state file = inBackend file err $ do
{- Inverse of annexFile. -}
unannexFile :: State -> FilePath -> IO ()
unannexFile state file = notinBackend file err $ \(key, backend) -> do
dropped <- dropFile state backend key
if (not dropped)
then error $ "backend refused to drop " ++ file
else cleanup key backend
dropFile state backend key
cleanup key backend
where
err = error $ "not annexed " ++ file
cleanup key backend = do