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:
parent
2f204b5d37
commit
7f992ef59c
11 changed files with 30 additions and 23 deletions
|
@ -13,6 +13,7 @@ import Command
|
|||
import qualified Annex
|
||||
import qualified Git.Config
|
||||
import Config
|
||||
import Annex.Perms
|
||||
import Utility.ThreadScheduler
|
||||
import Utility.DiskFree
|
||||
import Git.Types (fromConfigKey)
|
||||
|
@ -172,10 +173,10 @@ instance Arbitrary FuzzAction where
|
|||
]
|
||||
|
||||
runFuzzAction :: FuzzAction -> Annex ()
|
||||
runFuzzAction (FuzzAdd (FuzzFile f)) = liftIO $ do
|
||||
createDirectoryIfMissing True $ parentDir f
|
||||
n <- getStdRandom random :: IO Int
|
||||
writeFile f $ show n ++ "\n"
|
||||
runFuzzAction (FuzzAdd (FuzzFile f)) = do
|
||||
createWorkTreeDirectory (parentDir f)
|
||||
n <- liftIO (getStdRandom random :: IO Int)
|
||||
liftIO $ writeFile f $ show n ++ "\n"
|
||||
runFuzzAction (FuzzDelete (FuzzFile f)) = liftIO $ nukeFile f
|
||||
runFuzzAction (FuzzMove (FuzzFile src) (FuzzFile dest)) = liftIO $
|
||||
rename src dest
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue