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
|
@ -106,13 +106,16 @@ annexFileMode = withShared $ return . go
|
|||
go _ = stdFileMode
|
||||
sharedmode = combineModes groupSharedModes
|
||||
|
||||
{- Creates a directory inside the gitAnnexDir, creating any parent
|
||||
- directories up to and including the gitAnnexDir.
|
||||
{- Creates a directory inside the gitAnnexDir (or possibly the dbdir),
|
||||
- creating any parent directories up to and including the gitAnnexDir.
|
||||
- Makes directories with appropriate permissions. -}
|
||||
createAnnexDirectory :: RawFilePath -> Annex ()
|
||||
createAnnexDirectory dir = do
|
||||
top <- parentDir <$> fromRepo gitAnnexDir
|
||||
createDirectoryUnder' [top] dir createdir
|
||||
tops <- annexDbDir <$> Annex.getGitConfig >>= return . \case
|
||||
Nothing -> [top]
|
||||
Just dbdir -> [top, parentDir dbdir]
|
||||
createDirectoryUnder' tops dir createdir
|
||||
where
|
||||
createdir p = do
|
||||
liftIO $ R.createDirectory p
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue