2 # vim: set ts=4 sts=4 sw=4 textwidth=92:
5 Holds the OldRAR class.
7 This module works with old-style rar sets.
9 It will detect sets like the following:
19 Where the PAR2 files protect all of the rar files. Note that Y can be the same
20 as X, but is not required to be.
23 __author__ = "Ira W. Snyder (devel@irasnyder.com)"
24 __copyright__ = "Copyright (c) 2006,2007 Ira W. Snyder (devel@irasnyder.com)"
25 __license__ = "GNU GPL v2 (or, at your option, any later version)"
27 # OldRAR.py -- detect and work with old-style rar sets
29 # Copyright (C) 2006,2007 Ira W. Snyder (devel@irasnyder.com)
31 # This program is free software; you can redistribute it and/or modify
32 # it under the terms of the GNU General Public License as published by
33 # the Free Software Foundation; either version 2 of the License, or
34 # (at your option) any later version.
36 # This program is distributed in the hope that it will be useful,
37 # but WITHOUT ANY WARRANTY; without even the implied warranty of
38 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39 # GNU General Public License for more details.
41 # You should have received a copy of the GNU General Public License
42 # along with this program; if not, write to the Free Software
43 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
45 from PAR2Set import Base, utils
49 ############################################################################
52 if not utils.hasAMatch('^.*\.r00$', self.protectedFiles):
55 ############################################################################
58 files = utils.findMatches('^.*\.rar$', self.protectedFiles)
61 utils.runCommand(['unrar', 'x', '-o+', f], self.directory)
63 ############################################################################