I have a script for building a particular flavor of GCC cross-compiler. Throughout the script there are many paths that are not in canonical form, such as duplicate path separators (
/xxx/foo//bar/yyy) and intervening "this" directories (
I was about to canonicalize all of them, but I wonder if these forms are significant rather than just a case of the script not being cleaned up. In addition to the forms just mentioned, I am also curious whether including an "up directory" in a path can also be significant in any particular situation (ie. "
/xxx/foo/../bar/yyy instead of
/xxx/bar/yyy). For example, I came across a path like
The only potential situation that I can think of is when links are involved. I can imagine that the
.. form might behave differently, but how about the other two forms above?
Perhaps there is also platform-specific reasons for constructing paths in this way..?