Browse Source

Use cross-platform absolute path check

Sander Marechal 12 năm trước cách đây
mục cha
commit
c10e25a945
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/Composer/Autoload/AutoloadGenerator.php

+ 1 - 1
src/Composer/Autoload/AutoloadGenerator.php

@@ -159,7 +159,7 @@ EOF;
         foreach ($autoloads['classmap'] as $dir) {
             foreach (ClassMapGenerator::createMap($dir) as $class => $path) {
                 $path = $filesystem->findShortestPath(getcwd(), $path, true);
-                if ($path[0] == '/') {
+                if ($filesystem->isAbsolutePath($path)) {
                     $classMap[$class] = var_export($path, true).",\n";
                 } else {
                     $classMap[$class] = '$baseDir . '.var_export('/'.$path, true).",\n";