Fix several places where files in .git/annex/ were written with modes that did not take the core.sharedRepository config into account.

git grep writeFile finds some more that might also be problems, but
for now I've concentrated on .git/annex/ log files. There are certianly
cases where writeFile is not a problem too.

This commit was sponsored by mo on Patreon.
This commit is contained in:
Joey Hess 2018-01-02 17:17:10 -04:00
parent a73f12389d
commit 24df95f0f6
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
12 changed files with 62 additions and 40 deletions

View file

@ -26,7 +26,7 @@ import qualified Git
import qualified Git.Branch
import qualified Git.Ref
import Git.Types
import Utility.Tmp
import Logs.File
import qualified Data.Set as S
import Data.Char
@ -39,7 +39,7 @@ setView v = do
writeViews :: [View] -> Annex ()
writeViews l = do
f <- fromRepo gitAnnexViewLog
liftIO $ viaTmp writeFile f $ unlines $ map show l
writeLogFile f $ unlines $ map show l
removeView :: View -> Annex ()
removeView v = writeViews =<< filter (/= v) <$> recentViews