projects
/
rarslave2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[RARSLAVE] Fix runCheckAndRepair() for joined files
[rarslave2.git]
/
rarslave.py
diff --git
a/rarslave.py
b/rarslave.py
index
6972d41
..
a8e69bc
100644
(file)
--- a/
rarslave.py
+++ b/
rarslave.py
@@
-321,10
+321,16
@@
class PAR2Set (object):
self.name_matched_files = self.__find_name_matches (self.dir, self.basename)
self.name_matched_files = self.__find_name_matches (self.dir, self.basename)
+ def __is_joinfile (self, filename):
+ regex = re.compile ('^.*\.\d\d\d$', re.IGNORECASE)
+ if regex.match (filename):
+ return True
+
+ return False
+
def __should_be_joined (self, files):
def __should_be_joined (self, files):
- regex = re.compile ('^.*\.001$', re.IGNORECASE)
for f in files:
for f in files:
- if
regex.match
(f):
+ if
self.__is_joinfile
(f):
return True
def runCheckAndRepair (self):
return True
def runCheckAndRepair (self):
@@
-342,9
+348,10
@@
class PAR2Set (object):
if f != self.p2file:
command += "\"%s\" " % os.path.split (f)[1]
if f != self.p2file:
command += "\"%s\" " % os.path.split (f)[1]
+ # Only needed when using par2 to join
if join:
for f in all_files:
if join:
for f in all_files:
- if
f not in self.p2files
:
+ if
self.__is_joinfile (f)
:
command += "\"%s\" " % os.path.split (f)[1]
# run the command
command += "\"%s\" " % os.path.split (f)[1]
# run the command