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
|
@ -47,8 +47,8 @@ withLogHandle f a = do
|
|||
bracket (setup tmp) cleanup a
|
||||
where
|
||||
setup tmp = do
|
||||
setAnnexFilePerm (toRawFilePath tmp)
|
||||
liftIO $ openFile tmp WriteMode
|
||||
setAnnexFilePerm tmp
|
||||
liftIO $ openFile (fromRawFilePath tmp) WriteMode
|
||||
cleanup h = liftIO $ hClose h
|
||||
|
||||
-- | Appends a line to a log file, first locking it to prevent
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue