Open chrishuan9 opened 9 years ago
Not only does this spawn multiple processes, it seems to usually fail to properly extract the complete archive as the output file is getting overwritten upon each spawned process by only the portion contained in the "part file".
If the command 7z x XXXX.part01.rar is run, the archive extracts fine. Running 7z x on any other part file, XXXX.part02.rar for example, only extracts (I'm assuming) the data contained in that piece of the archive, not the full archive. The fix for this should be simply a matter of detecting the existence of XXXX.part01.rar, extracting it and ignoring the other part files. I'll take a look at the code and see if I can fix this.
Any progress? This is driving me crazy.
@FlyGuy94 I'm working on it. I can easily reproduce the bug.
However, if you use 'unrar' on linux the extraction will work because 'unrar' extracts the complete file regardless of which part you actually passed as a command line option to 'unrar'. In contract, if you use '7z' the extract fails because it will only do a partial extraction of the specified part .e.g 'part03.rar'. Personally, I hadn't had noticed the bug while developing the plugin because 'unrar' always successfully extracted the archive.
temporary workaround: use unrar to extract the archive and pass the following cmd switch: -o- so it will not overwrite files.
The extractor plugin launches an unrar process for every .rar in the download directory when a torrent completes. Files that are named
instead of
spawn up multiple unrar processes.
Automatically recognizing the type of rar packaging and only extracting part01.rar would make sense.