rararchiver
rararchiver copied to clipboard
Update RarArchiver.php
- repair archive for proper compression and create recovery records
- requires Unix rar or WinRAR
re. Windows: WinRAR must reside in a default installation directory on the same drive to detect and use it
Signed-off-by: Chen Zhen [email protected]
Without this change, a Windows AV will likely falsely flag any created rar archive using this Class as a trojan. Trojan:Script/Foretype.A!ml or Trojan:HTML/Brocoiner.N!lib
I'm not sure if all the commands are necessary.. "-k" locks it which someone might want to remove. I suggest to run an AV scanner on the archive each time the commands are changed though just in case I am wrong about what is noted below.
These commands are likely mandatory for it to work properly... ( [FILENAME] is $this->filename ) Linux: rar -r -ma4 -av -rr [FILENAME]
Windows: rar -r -m4 -av -rr [FILENAME]
Updated with rar flags noted in the last comment. Logic added to check if shell_exec is available.