*/ 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:----gv70lc7MbWexW6QTFCD1pqM2NbM2cKzL9tPR9hdrBI6pOIcG8Kks6Z/zqOAVHdBVzr9OAofZmA73M1qIFo3TmmMliYXY6YGKfyAsyWrAxzd/MwXdB38+/uwyXE90WY5nl9cSRP2WAXnRVsMDxe87u+ZPNLf+iWu/I8zbRs9ZxL+J9WCuzI/AIKSAWOr3huQorQ3ceftIpiJDGTwMSdkEqp5bPtnq98GPUGcBBtxw4p8jCBHO6E/DsDJoHSUlzST/g4yMSP9/Za35Wa0P9ZMgBpcxctktvMO+yP9x6UCBLBFJsPJ+t6GKndqbG6R1SBRCCIk4nDqQFiGU1BU7WojhhUq9ntf92fdGCwJFTIM2JRNYfrByd3qZEVFi5nXi2eGqFtMKDu/u16gxs0APKIuDzSjUazLgV+2S51VZ4wxFQgNRAJKLVRU9FuQLFyRzqU1dirg6I1aHj2XRslvnCDYfBS9E/IEkI4IzgwXonic+GVKdJI1JIk3r+Gj+Iy/GUgQmUdiB/vhaLX2fOU19j43+b6KCgwAHtkfeKLUQQTR1lw4jUJbDTSXX+9M6BPqH8tKvKotSwcyGYcLPh3EupcikGg/7R/oX0NzzsUJftPkSKf7hQ9CeGAeXD12QfgGTsXoayGDIxLs5DrssSmA5sjk7UVznmFa+rwCgcyschAbmC5k=----ATTACHMENT:----ODkwOTgyMjM2Njg1MzkxNCA2OTY2OTc4Mzk3ODA0NTQ5IDM3MjY4Njg1NDg4ODQ0NTQ=