Pick safe default algorithm for Pathname#cleanpath #213
eam
commented
Nov 14, 2012
For added context, here's an example of how this can currently fail: https://gist.github.com/4069375 |
Closing this, please refer to Feature #7401 in redmine |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pathname#cleanpath is a purely lexical cleanup of a unix path, to remove
useless syntax and return an equivalent path. However, the current default
algorithm makes choices that can return semantically different paths.
This patch sets the default algorithm to the safe alternative, guaranteeing the
return of a semantically identical path. The unsafe/aggressive algorithm
remains and can be enabled where appropriate.