1
0
Fork 0

Get realpath for `ZipArchive` (#11636)

pull/11639/head
Jason McCreary 2023-09-13 03:59:22 -04:00 committed by GitHub
parent 7a7f364184
commit 1e4966c313
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,11 @@ class ZipArchiver implements ArchiverInterface
public function archive(string $sources, string $target, string $format, array $excludes = [], bool $ignoreFilters = false): string
{
$fs = new Filesystem();
$sourcesRealpath = realpath($sources);
if (false !== $sourcesRealpath) {
$sources = $sourcesRealpath;
}
unset($sourcesRealpath);
$sources = $fs->normalizePath($sources);
$zip = new ZipArchive();