Skip to content

Commit

Permalink
Expand ~ to home dir in batch input expression
Browse files Browse the repository at this point in the history
  • Loading branch information
mittagessen committed Jul 29, 2024
1 parent 38484c3 commit 42366c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kraken/kraken.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ def process_pipeline(subcommands, input, batch_input, suffix, verbose, format_ty
placing their respective outputs in temporary files.
"""
import glob
import os.path
import tempfile

from threadpoolctl import threadpool_limits
Expand All @@ -364,7 +365,8 @@ def process_pipeline(subcommands, input, batch_input, suffix, verbose, format_ty
# expand batch inputs
if batch_input and suffix:
for batch_expr in batch_input:
for in_file in glob.glob(batch_expr, recursive=True):
for in_file in glob.glob(os.path.expanduser(batch_expr), recursive=True):

input.append((in_file, '{}{}'.format(os.path.splitext(in_file)[0], suffix)))

# parse pdfs
Expand Down

0 comments on commit 42366c7

Please sign in to comment.