From f102d09a4bbee1d85a78c7771567b1ce7242906a Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 2 Dec 2021 19:35:13 -0800 Subject: [PATCH] Use with_child instead of manual string building. --- rarpar.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rarpar.py b/rarpar.py index 79b06cd..51d6b55 100644 --- a/rarpar.py +++ b/rarpar.py @@ -123,7 +123,7 @@ def RARCOMMAND( else: input_pattern = path.absolute_path - command.append(f'{workdir.absolute_path}{os.sep}{basename}.rar') + command.append(workdir.with_child(f'{basename}.rar').absolute_path) command.append(f'{input_pattern}') return command @@ -142,8 +142,8 @@ def PARCOMMAND(workdir, basename, par): 'c', '-t1', f'-r{par}', '--', - f'{workdir.absolute_path}{os.sep}{basename}', - f'{workdir.absolute_path}{os.sep}{basename}*.rar', + workdir.with_child(f'{basename}').absolute_path, + workdir.with_child(f'{basename}*.rar').absolute_path, ] return command