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

@ -30,10 +30,10 @@ import qualified Remote
import qualified Types.Remote as Remote
import Types.UrlContents
import Logs.Web
import Logs.File
import qualified Utility.Format
import Utility.Tmp
import Command.AddUrl (addUrlFile, downloadRemoteFile, parseDownloadOptions, DownloadOptions(..))
import Annex.Perms
import Annex.UUID
import Backend.URL (fromUrl)
import Annex.Content
@ -386,8 +386,7 @@ checkFeedBroken' url f = do
now <- liftIO getCurrentTime
case prev of
Nothing -> do
createAnnexDirectory (parentDir f)
liftIO $ writeFile f $ show now
writeLogFile f $ show now
return False
Just prevtime -> do
let broken = diffUTCTime now prevtime > 60 * 60 * 23