File tree 1 file changed +3
-3
lines changed
src/Symfony/Component/DependencyInjection/Dumper
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -173,14 +173,14 @@ public function dump(array $options = [])
173
173
if (!empty ($ options ['file ' ]) && is_dir ($ dir = \dirname ($ options ['file ' ]))) {
174
174
// Build a regexp where the first root dirs are mandatory,
175
175
// but every other sub-dir is optional up to the full path in $dir
176
- // Mandate at least 2 root dirs and not more that 5 optional dirs.
176
+ // Mandate at least 1 root dir and not more than 5 optional dirs.
177
177
178
178
$ dir = explode (\DIRECTORY_SEPARATOR , realpath ($ dir ));
179
179
$ i = \count ($ dir );
180
180
181
- if (3 <= $ i ) {
181
+ if (2 + ( int ) ( '\\' === \ DIRECTORY_SEPARATOR ) <= $ i ) {
182
182
$ regex = '' ;
183
- $ lastOptionalDir = $ i > 8 ? $ i - 5 : 3 ;
183
+ $ lastOptionalDir = $ i > 8 ? $ i - 5 : ( 2 + ( int ) ( '\\' === \ DIRECTORY_SEPARATOR )) ;
184
184
$ this ->targetDirMaxMatches = $ i - $ lastOptionalDir ;
185
185
186
186
while (--$ i >= $ lastOptionalDir ) {
You can’t perform that action at this time.
0 commit comments