Fix regression on how Path.relative_to/2 dealt with "." as input
Module
Path
21 changes across 16 versions
Changes by version
Lazily evaluate File.cwd!/0 in Path.expand/1 and Path.absname/1
Ensure Path.relative_to/2 returns a relative path when the given argument does not share a common prefix with cwd
Deprecate Path.safe_relative_to/2 in favor of Path.safe_relative/2
Make sure Path.wildcard/2 expands .. symlinks accordingly
Add Path.safe_relative/1 and Path.safe_relative_to/2
Fix Path.relative_to/2 when referencing self
Do not crash when a volume is given to Path.absname/1, such as "c:"
Fix Path.absname/1 to correctly handle UNC paths on Windows
Do not expand ~ in Path.expand/2 when not followed by a path separator
Ensure recursive path operations raise on paths with null bytes (security issue reported by Griffin Byatt)
Ensure Path.join/1 returns strings for lists of one element
Fix a bug in path join with "/" followed by empty segments
Do not crash when expanding paths that go beyond the root, for example, Path.expand("/../..")
Do not normalize paths in Path.join/2 as normalization is beyond the scope of such function
Fix path expansion of "/.."
Do not match files starting with . in Path.wildcard/2 by default
Fix Path.absname("/") and Path.expand("/") to return the absolute path "/".
The functions in Path now only emit strings as result, regardless if the input was a char list or a string
Atoms are no longer supported in Path functions
Add Path.relative_to_cwd/2