private function extractFilename(\ZipArchive $zipArchive, $fileIndex)
    {
        $entry = $zipArchive->statIndex($fileIndex);

        // convert Windows directory separator to Unix style
        $filename  = str_replace('\\', '/', $entry['name']);

        if ($this->isValidPath($filename)) {
            return $filename;
        }

        throw new \Exception('Invalid filename path in zip archive');
    }
private function extractFilename(\ZipArchive $zipArchive, $fileIndex)
    {
        $entry = $zipArchive->statIndex($fileIndex);

        // convert Windows directory separator to Unix style
        $filename  = str_replace('\\', '/', $entry['name']);

        if ($this->isValidPath($filename)) {
            return $filename;
        }

        throw new \Exception('Invalid filename path in zip archive');
    }
Extract filename from .zip

@param \ZipArchive $zipArchive Zip file
@param integer     $fileIndex  File index

@return string