@@ -483,7 +483,7 @@ parseMode =
483
483
maybeReader $ \ s -> case split (== ' =' ) s of [k, v] -> Just (k, v); _ -> Nothing
484
484
485
485
----------------------------------------
486
- -- Running all requests contained in the `rpc_*` directory of a tarball
486
+ -- Running all requests contained in the subdirectories of the tarball
487
487
488
488
runTarball ::
489
489
CommonOptions ->
@@ -542,27 +542,25 @@ runTarball common (Just sock) tarFile keepGoing runOnly compareDetails = do
542
542
throwAnyError :: Either Tar. FormatError Tar. FileNameError -> IO a
543
543
throwAnyError = either throwIO throwIO
544
544
545
- -- unpack all rpc_ */*.json files into dir and return their names
545
+ -- unpack all */*.json files into dir and return their names
546
546
unpackIfRpc :: FilePath -> Tar. Entry -> IO [FilePath ] -> IO [FilePath ]
547
547
unpackIfRpc tmpDir entry acc = do
548
548
case splitFileName (Tar. entryPath entry) of
549
- -- unpack all directories "rpc_ <something>" containing "*.json" files
549
+ -- unpack all directories "<something>" containing "*.json" files
550
550
(dir, " " ) -- directory
551
- | Tar. Directory <- Tar. entryContent entry
552
- , " rpc_" `isPrefixOf` dir -> do
553
- createDirectoryIfMissing False dir -- create rpc dir so we can unpack files there
551
+ | Tar. Directory <- Tar. entryContent entry -> do
552
+ createDirectoryIfMissing True dir -- create rpc dir so we can unpack files there
554
553
acc -- no additional file to return
555
554
| otherwise ->
556
555
acc -- skip other directories and top-level files
557
556
(dir, file)
558
- | " rpc_" `isPrefixOf` dir
559
- , " .json" `isSuffixOf` file
557
+ | " .json" `isSuffixOf` file
560
558
, not (" ." `isPrefixOf` file)
561
559
, Tar. NormalFile bs _size <- Tar. entryContent entry -> do
562
560
-- unpack json files into tmp directory
563
561
let newPath = dir </> file
564
562
-- current tarballs do not have dir entries, create dir here
565
- createDirectoryIfMissing False $ tmpDir </> dir
563
+ createDirectoryIfMissing True $ tmpDir </> dir
566
564
BS. writeFile (tmpDir </> newPath) bs
567
565
(newPath : ) <$> acc
568
566
| otherwise ->
0 commit comments