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
)

View file

@ -68,5 +68,5 @@ depopulatePointerFile key file = do
(\t -> touch tmp' t False)
(fmap Posix.modificationTimeHiRes st)
#endif
withTSDelta (liftIO . genInodeCache (toRawFilePath tmp))
withTSDelta (liftIO . genInodeCache tmp')
maybe noop (restagePointerFile (Restage True) file) ic

View file

@ -132,7 +132,7 @@ start from inc si file key = Backend.getBackend (fromRawFilePath file) key >>= \
perform :: Key -> RawFilePath -> Backend -> NumCopies -> Annex Bool
perform key file backend numcopies = do
keystatus <- getKeyFileStatus key (fromRawFilePath file)
keystatus <- getKeyFileStatus key file
check
-- order matters
[ fixLink key file