diff options
author | Siri Hansen <[email protected]> | 2014-09-16 12:18:04 +0200 |
---|---|---|
committer | Siri Hansen <[email protected]> | 2014-09-25 12:29:40 +0200 |
commit | 9708887c78138cfc2697e397eb4127d2ed1f61e7 (patch) | |
tree | 532068dcaa4d69acc773f9ad3897dd593832d153 /configure.in | |
parent | 08fb3803a26d57c27cf9f0ef23c2fa49d15d0d33 (diff) | |
download | otp-9708887c78138cfc2697e397eb4127d2ed1f61e7.tar.gz otp-9708887c78138cfc2697e397eb4127d2ed1f61e7.tar.bz2 otp-9708887c78138cfc2697e397eb4127d2ed1f61e7.zip |
Fix handling of single dot in filename:join/2
The reference manual says that filename:join(A,B) is equivalent to
filename:join([A,B]). In some rare cases this turns out not to be
true:
1> filename:join("/a/.","b").
"/a/./b"
2> filename:join(["/a/.","b"]).
"/a/b"
In general, filename:join/1,2 removes single dots from the resulting
path, except dots that occur at the beginning or end of the path. The
problem above occurs when the first argument to join/2 ends with a
dot, then it is not removed even if the second argument differs from
an empty string and thus the dot ends up in "the middle" of the path.
This commit corrects this problem. A single dot is now only kept if it
occurs at the very beginning or the very end of the resulting path.
Test of filename:join/1,2 are added in filename_SUITE. In addition,
filelib_SUITE is updated with more tests of filelib:wildcard/2 since
this failed when the given current directory (second argument) ended
with a dot.
Diffstat (limited to 'configure.in')
0 files changed, 0 insertions, 0 deletions