1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-08-05 23:17:24 +02:00

Improved Windows compatibility, fix #54

This commit is contained in:
wapplay
2020-07-11 23:04:33 +03:00
parent 0655e282e9
commit c10c425f7e
13 changed files with 300 additions and 149 deletions

View File

@@ -77,7 +77,8 @@ class ZipPasswordTest extends ZipFileSetTestCase
$zipFile->saveAsFile($this->outputFilename);
$zipFile->close();
static::assertCorrectZipArchive($this->outputFilename, $password);
/** @see https://sourceforge.net/p/p7zip/discussion/383044/thread/c859a2f0/ WinZip 99-character limit */
static::assertCorrectZipArchive($this->outputFilename, substr($password, 0, 99));
// check from WinZip AES encryption
$zipFile->openFile($this->outputFilename);
@@ -137,7 +138,7 @@ class ZipPasswordTest extends ZipFileSetTestCase
);
}
$password = base64_encode(random_bytes(50));
$password = md5(random_bytes(50));
$zip = new ZipFile();
$zip->addDirRecursive($this->outputDirname);