From a6c3992764c70ec0ad9edf7565d30ec965fabe58 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Wed, 19 Jan 2022 21:00:17 -0800 Subject: [PATCH] Don't turn dir paths into dir\*, just pass it to winrar. I can't remember why I did it this way, but it was putting the directory's contents on the root of the archive, whereas the user might want the directory itself to be on the root of the archive, as is winrar's own behavior. --- rarpar.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rarpar.py b/rarpar.py index 51d6b55..3eaf11f 100644 --- a/rarpar.py +++ b/rarpar.py @@ -118,10 +118,7 @@ def RARCOMMAND( if path.is_dir: command.append('-r') - if path.is_dir: - input_pattern = path.absolute_path + '\\*' - else: - input_pattern = path.absolute_path + input_pattern = path.absolute_path command.append(workdir.with_child(f'{basename}.rar').absolute_path) command.append(f'{input_pattern}')