2 # vim: set ts=4 sts=4 sw=4 textwidth=92:
5 from RarslaveCommon import *
8 # This is an old-style rar type
10 # It will detect sets like the following:
24 # Where the PAR2 files protect all files that do not match in basename
25 # with the PAR2 file itself.
28 def detect_OLDRAR (name_files, prot_files):
29 return has_a_match ('^.*\.r00$', prot_files)
32 class PAR2Set_OLDRAR (PAR2Set.PAR2Set):
37 def find_extraction_heads (self):
38 return find_matches ('^.*\.rar', self.all_files)
40 def extraction_function (self, file, todir):
41 assert os.path.isfile (file)
42 assert os.path.isdir (todir)
44 RAR_CMD = config_get_value ('commands', 'unrar')
46 cmd = '%s \"%s\"' % (RAR_CMD, file)
47 ret = run_command (cmd, todir)