diff --git a/CHANGELOG b/CHANGELOG index 8b5c6bc81f..4e7384b6e8 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -29,6 +29,8 @@ git-annex (10.20230408) UNRELEASED; urgency=medium --json-error-messages is enabled, output a JSON object indicating the problem. (But git ls-files --error-unmatch still displays errors about such files in some situations.) + * init: Bug fix: Create .git/annex/ and .git/annex/fsckdb/ directories with + permissions configured by core.sharedRepository. * Warn about unsupported core.sharedRepository=0xxx when set. -- Joey Hess Sat, 08 Apr 2023 13:57:18 -0400 diff --git a/Database/Init.hs b/Database/Init.hs index 570cf5b32a..ac33fdae03 100644 --- a/Database/Init.hs +++ b/Database/Init.hs @@ -10,10 +10,8 @@ module Database.Init where import Annex.Common -import qualified Annex import Annex.Perms import Utility.FileMode -import Utility.Directory.Create import qualified Utility.RawFilePath as R import Database.Persist.Sqlite @@ -35,14 +33,8 @@ initDb db migration = do let tmpdbdir = dbdir <> ".tmp" let tmpdb = tmpdbdir P. "db" let tdb = T.pack (fromRawFilePath tmpdb) - gc <- Annex.getGitConfig - top <- parentDir <$> fromRepo gitAnnexDir - let tops = case annexDbDir gc of - Just topdbdir -> [top, parentDir (parentDir topdbdir)] - Nothing -> [top] - liftIO $ do - createDirectoryUnder tops tmpdbdir - runSqliteInfo (enableWAL tdb) migration + createAnnexDirectory tmpdbdir + liftIO $ runSqliteInfo (enableWAL tdb) migration setAnnexDirPerm tmpdbdir -- Work around sqlite bug that prevents it from honoring -- less restrictive umasks.