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

@ -13,6 +13,7 @@ import Command
import qualified Annex.Queue
import Annex.Content
import Annex.WorkTree
import Annex.Perms
import qualified Annex
import qualified Backend.URL
@ -85,7 +86,7 @@ perform key file = lookupFileNotHidden (toRawFilePath file) >>= \case
( hasothercontent
, do
link <- calcRepo $ gitAnnexLink file key
liftIO $ createDirectoryIfMissing True (parentDir file)
createWorkTreeDirectory (parentDir file)
liftIO $ createSymbolicLink link file
Annex.Queue.addCommand "add" [Param "--"] [file]
next $ return True