fix perms for core.sharedRepository
These two missed setting it. It rarely matters that the journal gets the right perm. But, when using annex.alwayscommit=false, someone else may come along later and want to append to the journal file. It probably never matters what the sentinal perms are, but for completeness.. Sponsored-by: Luke Shumaker on Patreon
This commit is contained in:
parent
f971b199ed
commit
0aa98aa09b
3 changed files with 9 additions and 3 deletions
|
@ -93,6 +93,8 @@ createInodeSentinalFile evenwithobjects =
|
|||
s <- annexSentinalFile
|
||||
createAnnexDirectory (parentDir (sentinalFile s))
|
||||
liftIO $ writeSentinalFile s
|
||||
setAnnexFilePerm (sentinalFile s)
|
||||
setAnnexFilePerm (sentinalCacheFile s)
|
||||
where
|
||||
alreadyexists = liftIO. sentinalFileExists =<< annexSentinalFile
|
||||
hasobjects
|
||||
|
|
|
@ -91,7 +91,10 @@ setJournalFile _jl ru file content = withOtherTmp $ \tmp -> do
|
|||
let tmpfile = tmp P.</> jfile
|
||||
liftIO $ withFile (fromRawFilePath tmpfile) WriteMode $ \h ->
|
||||
writeJournalHandle h content
|
||||
let mv = liftIO $ moveFile tmpfile (jd P.</> jfile)
|
||||
let dest = jd P.</> jfile
|
||||
let mv = do
|
||||
liftIO $ moveFile tmpfile dest
|
||||
setAnnexFilePerm dest
|
||||
-- avoid overhead of creating the journal directory when it already
|
||||
-- exists
|
||||
mv `catchIO` (const (createAnnexDirectory jd >> mv))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue