From 732b4fc341f8dd418b0b9d8bff9b2458662cd382 Mon Sep 17 00:00:00 2001 From: Bernhard Schussek Date: Mon, 28 Dec 2015 10:48:22 +0100 Subject: [PATCH] Fixed generated regular expression --- src/Glob.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Glob.php b/src/Glob.php index e85f3ff..069b2f9 100644 --- a/src/Glob.php +++ b/src/Glob.php @@ -306,7 +306,7 @@ public static function toRegEx($glob, $flags = 0, $delimiter = '~') case '/': if (isset($glob[$i + 3]) && '**/' === $glob[$i + 1].$glob[$i + 2].$glob[$i + 3]) { - $regex .= '/(.+/)*'; + $regex .= '/([^/]+/)*'; $i += 3; } else { $regex .= '/';