RawFilePath optimisations

This commit is contained in:
Joey Hess 2022-06-22 16:20:08 -04:00
parent 224a57f9ed
commit d00e23cac9
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 4 additions and 4 deletions

View file

@ -898,12 +898,12 @@ getKeyStatus key = catchDefaultIO KeyMissing $ do
then KeyUnlockedThin
else KeyPresent
getKeyFileStatus :: Key -> FilePath -> Annex KeyStatus
getKeyFileStatus :: Key -> RawFilePath -> Annex KeyStatus
getKeyFileStatus key file = do
s <- getKeyStatus key
case s of
KeyUnlockedThin -> catchDefaultIO KeyUnlockedThin $
ifM (isJust <$> isAnnexLink (toRawFilePath file))
ifM (isJust <$> isAnnexLink file)
( return KeyLockedThin
, return KeyUnlockedThin
)