We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c264e26 commit 350ebcdCopy full SHA for 350ebcd
composer-lock-diff
@@ -411,9 +411,17 @@ function dirnameSafe($path) {
411
}
412
413
function joinPath(/* path parts */) {
414
- return implode(DIRECTORY_SEPARATOR, array_map(function($part) {
+ $args = func_get_args();
415
+ $head = $args[0];
416
+ $lead = '';
417
+
418
+ if ($head[0] == DIRECTORY_SEPARATOR) {
419
+ $lead = DIRECTORY_SEPARATOR;
420
+ }
421
422
+ return $lead . implode(DIRECTORY_SEPARATOR, array_map(function($part) {
423
return trim($part, DIRECTORY_SEPARATOR);
- }, func_get_args()));
424
+ }, $args));
425
426
427
function ensureTrailingPathSep($path) {
0 commit comments