diff options
author | Björn Gustavsson <[email protected]> | 2019-08-19 15:45:46 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-08-22 12:23:45 +0200 |
commit | 72f704c7b83643bec889eabe3f9fe378639bb06e (patch) | |
tree | 6812843aaa76b489604466c687e15c90dc64a43b /lib/kernel/test/erl_distribution_wb_SUITE.erl | |
parent | d14919b70af5d08970f0e92aded2b375a79f4d94 (diff) | |
download | otp-72f704c7b83643bec889eabe3f9fe378639bb06e.tar.gz otp-72f704c7b83643bec889eabe3f9fe378639bb06e.tar.bz2 otp-72f704c7b83643bec889eabe3f9fe378639bb06e.zip |
Fix filelib:wildcard/1,2 for patterns containing ".." and/or "@"
`..` was broken and only worked when it was used in the beginning
of the pattern before any wildcard characters. For example:
1> filelib:wildcard("erts/..").
["erts/.."]
Using `..` preceded by wildcard characters would not work:
1> filelib:wildcard("*/..").
[]
`@` is not a wildcard character but is used internally in `filelib` as
an escape character and was not handled as other literal
characters. That could lead to performance degradation as it disabled
an optimization of the matching of the literal prefix of a pattern. It
would also cause the following example to fail:
1> filelib:wildcard("@/..").
[]
This commit corrects the handling `..` and also makes sure that the
use of `@` in a pattern does not degrade performance.
https://bugs.erlang.org/browse/ERL-1029
Diffstat (limited to 'lib/kernel/test/erl_distribution_wb_SUITE.erl')
0 files changed, 0 insertions, 0 deletions