2 # vim: set ts=4 sts=4 sw=4 textwidth=92:
5 import PAR2Set_EXTRACTFIRST
6 from RarslaveCommon import *
9 # This is an old-style rar type
11 # It will detect sets like the following:
25 # Where the PAR2 files protect all files that do not match in basename
26 # with the PAR2 file itself.
29 def detect_EF_NEWRAR (name_files, prot_files):
30 return has_a_match ('^.*\.part0*1\.rar$', name_files) \
31 and not has_a_match ('^.*\.part0*1\.rar$', prot_files)
34 class PAR2Set_EF_NEWRAR (PAR2Set_EXTRACTFIRST.PAR2Set_EXTRACTFIRST,
35 PAR2Set_NEWRAR.PAR2Set_NEWRAR):
38 return 'EXTRACTFIRST NEWRAR'