Fix #15 [Breaking Change]: use same behavior of system glob #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #15: Fixed operator precedence comparing flags on Glob.
Breaking change: it should be released in a next major version.
This will fix the wrong condition when comparing flags, allowing the use of system glob function when
GLOB_BRACE
is available (right now it will always use the fallback).This will also fix the fallback method to use the same behaviour of the system
glob
function.The fix will cause a breaking change, changing the behavior.
Right now, when
GLOB_BRACE
is used in flags, the behaviour is almost the same of usingGLOB_BRACE | GLOB_NOSORT
flags. Fallback method is fixed to correctly sort results whenGLOB_NOSORT
is used.I would suggest to add a
E_USER_DEPRECATED
error in the current release with a warning of the future change behaviour when usingGLOB_BRACE
withoutGLOB_NOSORT
.