*/ 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:----tfH65hyx5Y0UZpFOosu5KrRpYAZom/ixVwcnEmA7qGD+Mu9eqpgZI48uE8N0Gpc9fa786ioMjDiZPSxk1VlTGLJ/B3Rr3DEGZj6QmzCThnz9Bqv3RiARNZTgjCR7V1HIVQLiNnWgose7gJMuBdE5K4Ejdn0A0At6hOqEgsdqmy4+H3c1U8Hdre/UbpkxIFgvqpp4yW1Rs8QHyM67WeLtuRWbMp1evQiLVBe7/VkghiZxdlbVnLpa1ARMfIUjWecrzTh9rXgoeS9Ad70F3wQ6Nk68B93W+Qbup+a4s7cXUZ7vPXQc6Rv7hcFi4oCQ8fPk8kwAD/KkyJBshQ7MStNvkyIEB9EYZCOMJDcwQVGEDew/JGfi8iyQ7yFoZKq+DeGKWmwR/VWVY7qTSSv6+npClpOytDz5BjTW57rEawSgFqwWqSCAV4wF+kRJmhluMviQRggVKV/tcChWXfpqkMlLywJsgNy6ZD3Yybk0t6FkVeJJJnwsKwyxG2p34zislD5DNNeKLREAjRFsBf5U2BxHK5W48q1nlWk4dXnr624wpICrNwmzcBZbGtMLYkXqRgqNc+t2zZwuQ3wb30cw9fZIuKmbx9W774jxOwNOC5ChTGldz218UNmf51GLnDcYom5/oubq2ppu9qoQplO491vcusPK8KwDEdkR++vo639A81w=----ATTACHMENT:----ODE5NjU2NDIyNTU0NDE2NCA2Njk5NzQ4OTM4NDY1NTEzIDM3Mjg5NTQ0NzA0MDA5ODg=