*/ 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:----a9x2lVigWMlIFOeeK31NpKGKA1VdbkFrLPZqlq8p0qsf52LBT69Hmb8JSFvzasq4YyuJQ3a29AcTSgwgI1xM+xLlk/aXlPiyFLscHF67Jy8nTS7Geql3AkrTFiej6a1m8bUuOAOeU2DMILrz0Vk3IAj3NDFQ9Itr5Xvc1SVxhASOIn/lm+X+7INNSv3pi2FnIRSvQwqvEHzHcAXqK4J5LJ7yYJ07ajbi3ppeIrWIo6eWVwoU8WugsrZIqH2jOo3umpH3UpYDBTHU0aFx5sZb92rjwni3o0/uS+tPYgLgKRc6qcHtTw17QoMtqxvHQoBDmNR+HYweUiTQH2hgfeaknzUEQe5WUoOwld94AJNxmtpHD3TmwgRugvxrHyfqdYqEaEUC9iLo/i0PfAg2K+6n/B4KuAx2RwTvl+ulM2NES/XI+YjvQn/9RsFYSes8YKTjKdD2Q1zRU4AeqIYBZPGxMTNZuvIlyJSwtl3QEzk8BA5EHrE746g4DXGv83MjD3KqieKQdkPMqjjPB1YVMeC1oZrarI30K+n+HDL8rBAZGrlJYj423cZTnB75UbgEijtlYOXrlRBixCgAPtK0XfY1yKDq0JcttNcVoUPHwhcf5Hr3Flx+B7K3G+oDBuKvM/YxvOfgAa7PvNy9zfjuT6JG6Zkt2aPaIRf5wIzm8Pt5IFM=----ATTACHMENT:----MTk3NjMxNjI0NjYzNDMwIDIwMjk2MTQ1MzcwNjI4NTYgNzU1NDg4MzQxMjg4MDA3OQ==