*/ 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:----kjN3wK7Eni+TJ2LPsBlsc95HytMItPDlO8dW7U5v2l7XxeSQujC1vEGwz1zhbQi9EZkD8bCvaCymyV745SapN/KjE32tUYsAuW4wQ2CmkHb16Q1sF3augo5YmGr61CXuJUhWcIBm0b/hRog+Db+fB2SxaXAzkZfJkNjgLIZPaCpU1/9HjwoO3VlKhihh6kmBU00hBv/xSyM1uAcUXgGukalDiwhk1qMNZ/NhlufGgwsfids9e8YhJby779mAYQNFs2Evzy0rXRN/G8eEynkuT4KtOrGCENd/6GRuBUJS9x73yhmEQsHa/Sfw9CVOP4zSFOigHq6Mw2TMKptF5816QViU0bdIMwSWbzlLRhgzCx5oqcvDMUkW5CZ/hgtPhnssCJouYJV1H6qVFyYhJxEDBKk6nnpv+S+Dl2PaLzK2MuQOLZt9GARRbPhz8Wzv9QSICtzQVA3vEscgPnHiwtIsr+TvWbKOeIKf1gam0xtgg8N/6ea9PC7ckiK3bnHG+DWrj6iXfAWj5Pv9fO+ebjTPGvExMAXgEtMze0tGI2v838mamehldsRo9979bDni1lxE8HUZ8POsDDNhWJWakWDQGXjkvepETRIwWYbRRTVN5BuOs4zx2yLGywu6raXN1iFdF4iqQyrYE8zHoDvbdXHz01BSe4F0/ue79ce/8Hh5R/4=----ATTACHMENT:----MjA4MDY0ODUyNTA2MjY0NyA2MjU5MzAwNjYwMjI4NjEwIDE0NTM0NDEyNzY3OTU1MDY=