aboutsummaryrefslogtreecommitdiff
path: root/Command/FuzzTest.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-01-09 13:11:56 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-01-09 13:11:56 -0400
commit425bc1107aebdb701cdcee44da731dd918cd470d (patch)
tree25bcacb37277b70aa7bd0caaf0fe7c3edc665653 /Command/FuzzTest.hs
parent20c7644a4d85434cf49840ea92fca0c723710c72 (diff)
revert parentDir change
Reverts 2bba5bc22d049272d3328bfa6c452d3e2e50e86c Unfortunately, this caused breakage on Windows, and possibly elsewhere, because parentDir and takeDirectory do not behave the same when there is a trailing directory separator.
Diffstat (limited to 'Command/FuzzTest.hs')
-rw-r--r--Command/FuzzTest.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/FuzzTest.hs b/Command/FuzzTest.hs
index a2a474d31..87bee963f 100644
--- a/Command/FuzzTest.hs
+++ b/Command/FuzzTest.hs
@@ -173,7 +173,7 @@ instance Arbitrary FuzzAction where
runFuzzAction :: FuzzAction -> Annex ()
runFuzzAction (FuzzAdd (FuzzFile f)) = liftIO $ do
- createDirectoryIfMissing True $ takeDirectory f
+ createDirectoryIfMissing True $ parentDir f
n <- getStdRandom random :: IO Int
writeFile f $ show n ++ "\n"
runFuzzAction (FuzzDelete (FuzzFile f)) = liftIO $ nukeFile f
@@ -210,7 +210,7 @@ genFuzzAction = do
case md of
Nothing -> genFuzzAction
Just d -> do
- newd <- liftIO $ newDir (takeDirectory $ toFilePath d)
+ newd <- liftIO $ newDir (parentDir $ toFilePath d)
maybe genFuzzAction (return . FuzzMoveDir d) newd
FuzzDeleteDir _ -> do
d <- liftIO existingDir