Only add -r recurse flag if input path is directory.
I discovered an issue when the input path was a file, winrar was trying to access a sibling directory (particularly $recycle.bin while on drive root) and raising permission denied errors.
This commit is contained in:
parent
1d97479f41
commit
c0919242c2
1 changed files with 4 additions and 1 deletions
|
@ -52,7 +52,7 @@ def RARCOMMAND(
|
|||
'''
|
||||
command = [
|
||||
'winrar',
|
||||
'a -ibck -ma -m0 -mt1 -ri1:30 -r -ep1',
|
||||
'a -ibck -ma -m0 -mt1 -ri1:30 -ep1',
|
||||
'-y -xthumbs.db -xdesktop.ini',
|
||||
]
|
||||
if volume is not None:
|
||||
|
@ -67,6 +67,9 @@ def RARCOMMAND(
|
|||
if password is not None:
|
||||
command.append(f'-hp{password}')
|
||||
|
||||
if path.is_dir:
|
||||
command.append('-r')
|
||||
|
||||
if path.is_dir:
|
||||
input_pattern = path.absolute_path + '\\*'
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue