fix
This commit is contained in:
parent
ce0ee2aa44
commit
377bc7bbb7
1 changed files with 4 additions and 4 deletions
|
@ -222,11 +222,11 @@ existingFile n top = maybe (return Nothing) (go . toFilePath) =<< existingDir
|
||||||
if null dirs
|
if null dirs
|
||||||
then return Nothing
|
then return Nothing
|
||||||
else do
|
else do
|
||||||
n <- getStdRandom $ randomR (0, length dirs - 1)
|
i <- getStdRandom $ randomR (0, length dirs - 1)
|
||||||
existingFile (n - 1) (top </> dirs !! n)
|
existingFile (n - 1) (top </> dirs !! i)
|
||||||
else do
|
else do
|
||||||
n <- getStdRandom $ randomR (0, length files - 1)
|
i <- getStdRandom $ randomR (0, length files - 1)
|
||||||
return $ Just $ FuzzFile $ top </> dir </> files !! n
|
return $ Just $ FuzzFile $ top </> dir </> files !! i
|
||||||
|
|
||||||
existingDir :: IO (Maybe FuzzDir)
|
existingDir :: IO (Maybe FuzzDir)
|
||||||
existingDir = do
|
existingDir = do
|
||||||
|
|
Loading…
Reference in a new issue