Skip to content

Commit ea68c25

Browse files
e3krisztianqkaiser
authored andcommitted
Command: remove {infile} template
Using {infile} caused repeating the chunk offsets in the final file name.
1 parent 70b5c81 commit ea68c25

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/extractors/test_command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111

1212
def test_command_templating():
13-
command = Command("{infile}", "{outdir}", "{inpath},{outdir}")
13+
command = Command("{outdir}", "{inpath},{outdir}")
1414
cmdline = command._make_extract_command(
1515
Path("inputdir") / "input.file", Path("output")
1616
)
1717

18-
assert cmdline == ["input", "output", "inputdir/input.file,output"]
18+
assert cmdline == ["output", "inputdir/input.file,output"]
1919

2020

2121
@pytest.mark.parametrize(

unblob/extractors/command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def no_op():
6868
cleanup()
6969

7070
def _make_extract_command(self, inpath: Path, outdir: Path):
71-
replacements = dict(inpath=inpath, outdir=outdir, infile=inpath.stem)
71+
replacements = dict(inpath=inpath, outdir=outdir)
7272

7373
args = []
7474
for t in self._command_template:

0 commit comments

Comments
 (0)