aboutsummaryrefslogtreecommitdiff
path: root/src/NormalizeCaseInsensitiveString.hpp
diff options
context:
space:
mode:
authorRichard Walters <rwalters@digitalstirling.com>2018-07-03 00:19:10 -0700
committerRichard Walters <rwalters@digitalstirling.com>2018-07-03 00:19:10 -0700
commitea77de493c75fc5b7fad10ef79b645e98d3f94e8 (patch)
tree832a12424c3b45f9756064c77e641da707b0bfe9 /src/NormalizeCaseInsensitiveString.hpp
parent22cfb83209a7da292a07b66945ca545cc0954524 (diff)
Complete rewrite of NormalizePath
The former algorithm was based on the pseuocode from the RFC, which is hard to follow, more suitable when the path is in a single string, not a sequence of segments. The new algorithm uses two flags: * isAbsolute - recognize that if the path starts out as an absolute path, it needs to stay that way. * atDirectoryLevel - recognize that if we encounter a "." or "..", then it will be reduced by simply discarding it or going back/up one stop, but then we will be in a "directory" context, meaning that should we end the path at this point, there needs to be an empty-string segment to mark that the end of the path is reaching into a directory, not just referring to the directory.
Diffstat (limited to 'src/NormalizeCaseInsensitiveString.hpp')
0 files changed, 0 insertions, 0 deletions