RawFilePath optimisations
This commit is contained in:
parent
224a57f9ed
commit
d00e23cac9
3 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue