fsck bugfixes
This commit is contained in:
parent
abebbcfd54
commit
dd573e7010
2 changed files with 5 additions and 3 deletions
|
@ -47,7 +47,7 @@ keyValue file = do
|
|||
|
||||
{- Extracts the file size from a key. -}
|
||||
keySize :: Key -> FileOffset
|
||||
keySize key = read $ section !! 2
|
||||
keySize key = read $ section !! 1
|
||||
where
|
||||
section = split ":" (keyName key)
|
||||
|
||||
|
|
6
Core.hs
6
Core.hs
|
@ -207,9 +207,11 @@ fromAnnex key dest = do
|
|||
moveBad :: Key -> Annex FilePath
|
||||
moveBad key = do
|
||||
g <- Annex.gitRepo
|
||||
let src = parentDir $ annexLocation g key
|
||||
let src = annexLocation g key
|
||||
let dest = annexBadLocation g
|
||||
liftIO $ renameDirectory src dest
|
||||
liftIO $ createDirectoryIfMissing True dest
|
||||
liftIO $ renameFile src (dest ++ takeFileName src)
|
||||
liftIO $ removeDirectory (parentDir src)
|
||||
return dest
|
||||
|
||||
{- List of keys whose content exists in .git/annex/objects/ -}
|
||||
|
|
Loading…
Reference in a new issue