Skip to content

Commit

Permalink
Rename extract-root to prefix, add suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed Feb 24, 2019
1 parent 12eddab commit f3d5fd5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/tarballs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ multi MAIN (「decrypt」, $pathword) {

multi MAIN (
serve,
Str :$extract-root = $*CWD.Str, #= the root to start extractions from
Str :$prefix = $*CWD.Str, #= the root to start extractions from
Str :$suffix = application, #= the suffix to add to extraction targets
Int :$port = 7440, #= port to bind to
Str :$host = localhost #= host to bind to
) {
Expand All @@ -72,7 +73,7 @@ multi MAIN (
}
post -> {
request-body -> (:$pathword, :$ball, *%rest) {
my $path = "{$extract-root}/{decrypt-pathword($pathword.Str)}";
my $path = "{$prefix}/{decrypt-pathword($pathword.Str)}{$suffix}";
my $filename = $ball.filename;
untar($ball.body-blob, $path);
content text/plain, thanks;
Expand Down

0 comments on commit f3d5fd5

Please sign in to comment.