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
|
then KeyUnlockedThin
|
||||||
else KeyPresent
|
else KeyPresent
|
||||||
|
|
||||||
getKeyFileStatus :: Key -> FilePath -> Annex KeyStatus
|
getKeyFileStatus :: Key -> RawFilePath -> Annex KeyStatus
|
||||||
getKeyFileStatus key file = do
|
getKeyFileStatus key file = do
|
||||||
s <- getKeyStatus key
|
s <- getKeyStatus key
|
||||||
case s of
|
case s of
|
||||||
KeyUnlockedThin -> catchDefaultIO KeyUnlockedThin $
|
KeyUnlockedThin -> catchDefaultIO KeyUnlockedThin $
|
||||||
ifM (isJust <$> isAnnexLink (toRawFilePath file))
|
ifM (isJust <$> isAnnexLink file)
|
||||||
( return KeyLockedThin
|
( return KeyLockedThin
|
||||||
, return KeyUnlockedThin
|
, return KeyUnlockedThin
|
||||||
)
|
)
|
||||||
|
|
|
@ -68,5 +68,5 @@ depopulatePointerFile key file = do
|
||||||
(\t -> touch tmp' t False)
|
(\t -> touch tmp' t False)
|
||||||
(fmap Posix.modificationTimeHiRes st)
|
(fmap Posix.modificationTimeHiRes st)
|
||||||
#endif
|
#endif
|
||||||
withTSDelta (liftIO . genInodeCache (toRawFilePath tmp))
|
withTSDelta (liftIO . genInodeCache tmp')
|
||||||
maybe noop (restagePointerFile (Restage True) file) ic
|
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 -> RawFilePath -> Backend -> NumCopies -> Annex Bool
|
||||||
perform key file backend numcopies = do
|
perform key file backend numcopies = do
|
||||||
keystatus <- getKeyFileStatus key (fromRawFilePath file)
|
keystatus <- getKeyFileStatus key file
|
||||||
check
|
check
|
||||||
-- order matters
|
-- order matters
|
||||||
[ fixLink key file
|
[ fixLink key file
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue