annex.dbdir fully working
Completes work started in e60766543f
I've verified that all the sqlite databases get stored in annex.dbdir
and are created successfully. If annex.dbdir does not exist, it will be
created; its parent directory must already exist though.
Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
parent
23c6e350cb
commit
a335c1e46e
3 changed files with 12 additions and 8 deletions
|
@ -36,11 +36,12 @@ initDb db migration = do
|
|||
let tmpdb = tmpdbdir P.</> "db"
|
||||
let tdb = T.pack (fromRawFilePath tmpdb)
|
||||
gc <- Annex.getGitConfig
|
||||
top <- case annexDbDir gc of
|
||||
Just topdbdir -> pure $ parentDir $ topdbdir
|
||||
Nothing -> parentDir <$> fromRepo gitAnnexDir
|
||||
top <- parentDir <$> fromRepo gitAnnexDir
|
||||
let tops = case annexDbDir gc of
|
||||
Just topdbdir -> [top, parentDir topdbdir]
|
||||
Nothing -> [top]
|
||||
liftIO $ do
|
||||
createDirectoryUnder [top] tmpdbdir
|
||||
createDirectoryUnder tops tmpdbdir
|
||||
runSqliteInfo (enableWAL tdb) migration
|
||||
setAnnexDirPerm tmpdbdir
|
||||
-- Work around sqlite bug that prevents it from honoring
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue