Add support for Join sets where the parity protects the split files These sorts of sets are sometimes created by people who do not know exactly what they are doing. It is beneficial to be able to extract these sets appropriately.
Major Update This changes the structure of the entire program, making it much simpler to maintain. The old structure was needlessly complicated by improper use of packages. This version is lacking a few features that were present in the original version, but nothing that I ever used. Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Use exceptions for error handling The previous error handling strategy was very Linux kernel like, showing influence from what I was working on while I designed this program. Refactor the program to use exceptions, which significantly reduces the amount of code needed for error handling. Best practices are now followed: we only catch exceptions where we need to log a message and rethrow, or for a complete unit of work. Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Bugfix: Fix deletion of .1 files for NoExtract type The NoExtract type failed to delete files that were produced during the repair stage. These files typically end with the extension ".1". This patch updates the update_matches() function to handle this case. Note that it is possible that other sets will have this problem, in which case this patch could be ported to the PAR2Set.Base.Base class, but I have never seen such a case in the wild. Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
[PAR2Set] Fix extraction head regular expression The regular expression for finding the extraction heads of an OldRAR type was incorrect. This patch adds the missing termination character. This keeps it from trying to extract files created during repair, such as: X.rar.1 Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
[JOIN] Fix removal of protected files In the join case, since we are not extracting files, we don't really want to remove the files. So, in this case, remove all files that the delete_regex matches, but not the files that are protected. This fixes the following case: ========================================== X.rar.par2 X.rar.vol0+1.par2 ... X.rar.001 X.rar.002 ... Where X.rar is the only protected file. When the process completes, X.rar will be the only file left. Signed-off-by: Ira W. Snyder <devel@irasnyder.com>
Add Copyright / License information + Documentation Add the COPYING file (GPLv2). Add the GPLv2 copyright notice to all files. Add documentation to all modules, classes, and functions. Signed-off-by: Ira W. Snyder <devel@irasnyder.com>