parent
a2a70380c1
commit
50fbfe4d63
|
@ -43,7 +43,7 @@ class AutoloadGenerator
|
||||||
|
|
||||||
$filesystem = new Filesystem();
|
$filesystem = new Filesystem();
|
||||||
$filesystem->ensureDirectoryExists($config->get('vendor-dir'));
|
$filesystem->ensureDirectoryExists($config->get('vendor-dir'));
|
||||||
$basePath = $filesystem->normalizePath(getcwd());
|
$basePath = $filesystem->normalizePath(realpath(getcwd()));
|
||||||
$vendorPath = $filesystem->normalizePath(realpath($config->get('vendor-dir')));
|
$vendorPath = $filesystem->normalizePath(realpath($config->get('vendor-dir')));
|
||||||
$useGlobalIncludePath = (bool) $config->get('use-include-path');
|
$useGlobalIncludePath = (bool) $config->get('use-include-path');
|
||||||
$prependAutoloader = $config->get('prepend-autoloader') === false ? 'false' : 'true';
|
$prependAutoloader = $config->get('prepend-autoloader') === false ? 'false' : 'true';
|
||||||
|
|
|
@ -223,11 +223,11 @@ class Filesystem
|
||||||
}
|
}
|
||||||
|
|
||||||
$commonPath = $to;
|
$commonPath = $to;
|
||||||
while (strpos($from.'/', $commonPath.'/') !== 0 && '/' !== $commonPath && !preg_match('{^[a-z]:/?$}i', $commonPath) && '\\' !== $commonPath) {
|
while (strpos($from.'/', $commonPath.'/') !== 0 && '/' !== $commonPath && !preg_match('{^[a-z]:/?$}i', $commonPath)) {
|
||||||
$commonPath = dirname($commonPath);
|
$commonPath = strtr(dirname($commonPath), '\\', '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 !== strpos($from, $commonPath) || '/' === $commonPath || '\\' === $commonPath) {
|
if (0 !== strpos($from, $commonPath) || '/' === $commonPath) {
|
||||||
return $to;
|
return $to;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ class Filesystem
|
||||||
|
|
||||||
$commonPath = $to;
|
$commonPath = $to;
|
||||||
while (strpos($from.'/', $commonPath.'/') !== 0 && '/' !== $commonPath && !preg_match('{^[a-z]:/?$}i', $commonPath) && '.' !== $commonPath) {
|
while (strpos($from.'/', $commonPath.'/') !== 0 && '/' !== $commonPath && !preg_match('{^[a-z]:/?$}i', $commonPath) && '.' !== $commonPath) {
|
||||||
$commonPath = dirname($commonPath);
|
$commonPath = strtr(dirname($commonPath), '\\', '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (0 !== strpos($from, $commonPath) || '/' === $commonPath || '.' === $commonPath) {
|
if (0 !== strpos($from, $commonPath) || '/' === $commonPath || '.' === $commonPath) {
|
||||||
|
|
Loading…
Reference in New Issue