mostly finished with createDirectoryUnder conversion

Remaining things needing converted are in the assistant, and Annex.Ssh.

Every other remaining call to createDirectoryIfMissing True has been
audited and is not relevant. The ones in Build/ of course don't get
included in the program. Others included eg, Remote.Tahoe and
Config.Files which both write to dotfiles under the home directory.
This commit is contained in:
Joey Hess 2020-03-06 11:57:15 -04:00
parent 2f204b5d37
commit 7f992ef59c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
11 changed files with 30 additions and 23 deletions

View file

@ -17,6 +17,7 @@ import qualified Data.ByteString.Lazy as L
import Annex.Common
import Annex.Content
import Annex.Link
import Annex.Perms
import Types.Key
import Logs.Presence
import qualified Annex.Queue
@ -115,7 +116,7 @@ moveLocationLogs = do
dest <- fromRepo $ logFile2 k
dir <- fromRepo Upgrade.V2.gitStateDir
let f = dir </> l
liftIO $ createDirectoryIfMissing True (parentDir dest)
createWorkTreeDirectory (parentDir dest)
-- could just git mv, but this way deals with
-- log files that are not checked into git,
-- as well as merging with already upgraded