push RawFilePath down into Annex.ReplaceFile
Minor optimisation, but a win in every case, except for a couple where it's a wash. Note that replaceFile still takes a FilePath, because it needs to operate on Chars to truncate unicode filenames properly.
This commit is contained in:
parent
c873586e14
commit
d9fd205cbb
12 changed files with 38 additions and 44 deletions
|
@ -54,14 +54,14 @@ perform dest key = do
|
|||
destic <- replaceWorkTreeFile (fromRawFilePath dest) $ \tmp -> do
|
||||
ifM (inAnnex key)
|
||||
( do
|
||||
r <- linkFromAnnex' key (toRawFilePath tmp) destmode
|
||||
r <- linkFromAnnex' key tmp destmode
|
||||
case r of
|
||||
LinkAnnexOk -> return ()
|
||||
LinkAnnexNoop -> return ()
|
||||
LinkAnnexFailed -> giveup "unlock failed"
|
||||
, liftIO $ writePointerFile (toRawFilePath tmp) key destmode
|
||||
, liftIO $ writePointerFile tmp key destmode
|
||||
)
|
||||
withTSDelta (liftIO . genInodeCache (toRawFilePath tmp))
|
||||
withTSDelta (liftIO . genInodeCache tmp)
|
||||
next $ cleanup dest destic key destmode
|
||||
|
||||
cleanup :: RawFilePath -> Maybe InodeCache -> Key -> Maybe FileMode -> CommandCleanup
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue