Skip to content

Commit f9c76ec

Browse files
committed
Use Path::parent() instead of dirname()
1 parent 5a971d5 commit f9c76ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/php/xp/lambda/PackageLambda.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private function add(ZipArchiveWriter $zip, Path $path, Path $base, $prefix= '')
3838
// - Files: Add to ZIP
3939
// - Folders: Recursively add all subfolders and files therein
4040
if (Sources::IS_LINK === ($stat['mode'] & Sources::IS_LINK)) {
41-
$resolved= Path::real([dirname($path), readlink($path)], $base);
41+
$resolved= $path->parent()->resolve(readlink($path))->asRealpath($base);
4242
if ($resolved->exists()) {
4343
$base= $resolved->isFile() ? new Path(dirname($resolved)) : $resolved;
4444
yield from $this->add($zip, $resolved, $base, $relative.DIRECTORY_SEPARATOR);

0 commit comments

Comments
 (0)