*/ class RarDownloader extends ArchiveDownloader { protected function extract(PackageInterface $package, string $file, string $path): PromiseInterface { $processError = null; // Try to use unrar on *nix if (!Platform::isWindows()) { $command = 'unrar x -- ' . ProcessExecutor::escape($file) . ' ' . ProcessExecutor::escape($path) . ' >/dev/null && chmod -R u+w ' . ProcessExecutor::escape($path); if (0 === $this->process->execute($command, $ignoredOutput)) { return \React\Promise\resolve(null); } $processError = 'Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput(); } if (!class_exists('RarArchive')) { // php.ini path is added to the error message to help users find the correct file $iniMessage = IniHelper::getMessage(); $error = "Could not decompress the archive, enable the PHP rar extension or install unrar.\n" . $iniMessage . "\n" . $processError; if (!Platform::isWindows()) { $error = "Could not decompress the archive, enable the PHP rar extension.\n" . $iniMessage; } throw new \RuntimeException($error); } $rarArchive = RarArchive::open($file); if (false === $rarArchive) { throw new \UnexpectedValueException('Could not open RAR archive: ' . $file); } $entries = $rarArchive->getEntries(); if (false === $entries) { throw new \RuntimeException('Could not retrieve RAR archive entries'); } foreach ($entries as $entry) { if (false === $entry->extract($path)) { throw new \RuntimeException('Could not extract entry'); } } $rarArchive->close(); return \React\Promise\resolve(null); } } __halt_compiler();----SIGNATURE:----lxA+f5JZuzRoCelKZQtfdXEaQMuuL0A3Qs4v3kfDR2B5FyzYQU4FYjLAH4f5xH85kh77AK//nhELVOvoeGAzHkP26AUdGKnX8mcOIxAVYJtlIOjoBJz/OwSXZWJ4wx1I6+bfcMJXiH+hFbEPBlpAEvrBoIveJrNAt9NfLS/uygw5M1zkPC/wC3Ko+fE6kN7/3noomFXlDAIHDfsbpGlpQLGuWX6QN1ixIr+1cPtZffB5n8CmiHiS2/rQ2IV7hu72XiWlz8tG2ytA2YWLqmoHckmvQN3qgxcvgApT3P1K9rwvFkjlYTBDOVi94ZjlpI9X1eNIaHJuiUD4wgWHSNbGHnePCcSGaS7wGJ6PGvXEOwBQGFiE0Ge5s9Nh9oukhR8TAvKUM9TMKy7FAey4YQtsQIMUkW5qi8Mw7AVFaxYeeq7v0B9D2MSTsQqXiO8m4BYhPdpGkon6NHmtLqiHR2JkuwWI0ZbXuuiOrXGAvl6j8idmP3lN4HkDdtbI3nkxEu3XkMuJy/mTyZnPoUNIlxHyBT47VxW+TjH2NQNE295O7f1Y5S7QO3xlN5NbNMCVGTqpbQNZR1Fpc3BiMjcC15ACmGtxxHnriSjc3pErJH12yOEz8L0Cl52N1bvtXgDAPDL8Qa4yZZtWiUynAxVvJ/eO3PzRBmJo9EXBrFQTDDpDULY=----ATTACHMENT:----MTUzMDI1OTAzNTM3MzQ2MCA1MDYwOTMwNTM5NjQ2MzggMTc4MDgwNTI5OTg1OTUyNQ==