[Lldb-commits] [lldb] 58c7bf2 - Update LLDB filespec tests for remove_dots change

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Tue May 5 02:50:11 PDT 2020


On 05/05/2020 02:27, Reid Kleckner via lldb-commits wrote:
> I am not sure if "C:..\.." should become "C:" or "C:\", though. The new
> output doesn't precisely match the TODO message, but it seems
> appropriate given the specification of remove_dots and how .. traversals
> work at the root directory.

Yeah, I don't think "c:\" was right there, though I am not sure that
"c:" is fully right either. According to my understanding of windows
paths, "c:..\.." refers to a directory which is two levels up from the
current directory of drive "c". Since we don't know what that directory
is, we can't simplify this path any more that we can simplify the
"../.." path on posix.

This would be consistent with how python handles windows paths:
>>> import ntpath
>>> ntpath.normpath(r"c:\a\..")
'c:\\'
>>> ntpath.normpath(r"c:\..")
'c:\\'
>>> ntpath.normpath(r"c:..")
'c:..'


pl


More information about the lldb-commits mailing list