Browse Source

Made wildcard expansion consistent with bash

annesosensio 9 years ago
parent
commit
2e4157145b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Composer/Autoload/AutoloadGenerator.php

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

@@ -691,8 +691,8 @@ FOOTER;
                         $path = preg_quote(trim(strtr($path, '\\', '/'), '/'));
 
                         // add support for wildcards * and **
-                        $path = str_replace('\\*\\*', '.*?', $path);
-                        $path = str_replace('\\*', '[^/]*?', $path);
+                        $path = str_replace('\\*\\*', '.+?', $path);
+                        $path = str_replace('\\*', '[^/]+?', $path);
 
                         $autoloads[] = empty($installPath) ? preg_quote(strtr(getcwd(), '\\', '/')) . '/' . $path : preg_quote($installPath) . '/' . $path;
                         continue;