Skip to content

Commit e854daa

Browse files
committed
Remove directory name assumption in kore-rpc-client
1 parent 6862e0b commit e854daa

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

booster/tools/rpc-client/RpcClient.hs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ parseMode =
483483
maybeReader $ \s -> case split (== '=') s of [k, v] -> Just (k, v); _ -> Nothing
484484

485485
----------------------------------------
486-
-- Running all requests contained in the `rpc_*` directory of a tarball
486+
-- Running all requests contained in the subdirectories of the tarball
487487

488488
runTarball ::
489489
CommonOptions ->
@@ -548,15 +548,13 @@ runTarball common (Just sock) tarFile keepGoing runOnly compareDetails = do
548548
case splitFileName (Tar.entryPath entry) of
549549
-- unpack all directories "rpc_<something>" containing "*.json" files
550550
(dir, "") -- directory
551-
| Tar.Directory <- Tar.entryContent entry
552-
, "rpc_" `isPrefixOf` dir -> do
551+
| Tar.Directory <- Tar.entryContent entry -> do
553552
createDirectoryIfMissing False dir -- create rpc dir so we can unpack files there
554553
acc -- no additional file to return
555554
| otherwise ->
556555
acc -- skip other directories and top-level files
557556
(dir, file)
558-
| "rpc_" `isPrefixOf` dir
559-
, ".json" `isSuffixOf` file
557+
| ".json" `isSuffixOf` file
560558
, not ("." `isPrefixOf` file)
561559
, Tar.NormalFile bs _size <- Tar.entryContent entry -> do
562560
-- unpack json files into tmp directory

0 commit comments

Comments
 (0)