def find_extraction_heads (self):
"""Find the heads of extraction for an old-style rar set"""
- return rsutil.common.find_matches ('^.*\.rar', self.all_files)
+ return rsutil.common.find_matches ('^.*\.rar$', self.all_files)
def extraction_function (self, file, todir):
"""Extract a single rar file to the given directory.
assert os.path.isfile (file)
assert os.path.isdir (todir)
- RAR_CMD = rsutil.common.config_get_value ('commands', 'unrar')
-
- cmd = '%s \"%s\"' % (RAR_CMD, file)
- ret = rsutil.common.run_command (cmd, todir)
-
- # Check error code
- if ret != 0:
- return -rsutil.common.EEXTRACT
-
- return rsutil.common.SUCCESS
+ rsutil.common.run_command(['unrar', 'x', '-o+', file], todir)