Get realpath for `ZipArchive` (#11636)
parent
7a7f364184
commit
1e4966c313
|
@ -31,6 +31,11 @@ class ZipArchiver implements ArchiverInterface
|
||||||
public function archive(string $sources, string $target, string $format, array $excludes = [], bool $ignoreFilters = false): string
|
public function archive(string $sources, string $target, string $format, array $excludes = [], bool $ignoreFilters = false): string
|
||||||
{
|
{
|
||||||
$fs = new Filesystem();
|
$fs = new Filesystem();
|
||||||
|
$sourcesRealpath = realpath($sources);
|
||||||
|
if (false !== $sourcesRealpath) {
|
||||||
|
$sources = $sourcesRealpath;
|
||||||
|
}
|
||||||
|
unset($sourcesRealpath);
|
||||||
$sources = $fs->normalizePath($sources);
|
$sources = $fs->normalizePath($sources);
|
||||||
|
|
||||||
$zip = new ZipArchive();
|
$zip = new ZipArchive();
|
||||||
|
|
Loading…
Reference in New Issue