fsck: Fix detection and fixing of present direct mode files that are wrongly represented as standin symlinks on crippled filesystems.

This commit is contained in:
Joey Hess 2013-09-13 12:50:29 -04:00
parent 0dc38adce6
commit 65fe2314be
2 changed files with 3 additions and 3 deletions

View file

@ -271,7 +271,7 @@ verifyDirectMapping key file = do
{- Ensures that files whose content is available are in direct mode. -} {- Ensures that files whose content is available are in direct mode. -}
verifyDirectMode :: Key -> FilePath -> Annex Bool verifyDirectMode :: Key -> FilePath -> Annex Bool
verifyDirectMode key file = do verifyDirectMode key file = do
whenM (isDirect <&&> islink) $ do whenM (isDirect <&&> isJust <$> isAnnexLink file) $ do
v <- toDirectGen key file v <- toDirectGen key file
case v of case v of
Nothing -> noop Nothing -> noop
@ -279,8 +279,6 @@ verifyDirectMode key file = do
showNote "fixing direct mode" showNote "fixing direct mode"
a a
return True return True
where
islink = liftIO $ isSymbolicLink <$> getSymbolicLinkStatus file
{- The size of the data for a key is checked against the size encoded in {- The size of the data for a key is checked against the size encoded in
- the key's metadata, if available. - the key's metadata, if available.

2
debian/changelog vendored
View file

@ -4,6 +4,8 @@ git-annex (4.20130912) UNRELEASED; urgency=low
* remotes: New command, displays a compact table of remotes that * remotes: New command, displays a compact table of remotes that
contain files. contain files.
(Thanks, anarcat for display code and mastensg for inspiration.) (Thanks, anarcat for display code and mastensg for inspiration.)
* fsck: Fix detection and fixing of present direct mode files that are
wrongly represented as standin symlinks on crippled filesystems.
-- Joey Hess <joeyh@debian.org> Thu, 12 Sep 2013 12:14:46 -0400 -- Joey Hess <joeyh@debian.org> Thu, 12 Sep 2013 12:14:46 -0400