info: Support querying info of individual files in direct mode.

This commit is contained in:
Joey Hess 2015-09-09 14:15:56 -04:00
parent 3c25f978bb
commit 2b326594a9
3 changed files with 3 additions and 6 deletions

View file

@ -24,7 +24,6 @@ import Command
import Utility.DataUnits
import Utility.DiskFree
import Annex.Content
import Annex.Link
import Types.Key
import Logs.UUID
import Logs.Trust
@ -127,8 +126,7 @@ itemInfo o p = ifM (isdir p)
v' <- Remote.nameToUUID' p
case v' of
Right u -> uuidInfo o u
Left _ -> maybe noinfo (fileInfo o p)
=<< isAnnexLink p
Left _ -> ifAnnexed p (fileInfo o p) noinfo
)
where
isdir = liftIO . catchBoolIO . (isDirectory <$$> getFileStatus)