[Lldb-commits] [lldb] r236541 - Make sure that the following paths say they are equal:

Greg Clayton gclayton at apple.com
Tue May 5 13:26:58 PDT 2015


Author: gclayton
Date: Tue May  5 15:26:58 2015
New Revision: 236541

URL: http://llvm.org/viewvc/llvm-project?rev=236541&view=rev
Log:
Make sure that the following paths say they are equal:

/private/tmp/main.cpp
/private/tmp/..//tmp/main.cpp

We saw paths like this in makefile generate binaries when someone left an extra '/' on the end of a makefile variable.

<rdar://problem/18945972>


Modified:
    lldb/trunk/source/Host/common/FileSpec.cpp

Modified: lldb/trunk/source/Host/common/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/FileSpec.cpp?rev=236541&r1=236540&r2=236541&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/FileSpec.cpp (original)
+++ lldb/trunk/source/Host/common/FileSpec.cpp Tue May  5 15:26:58 2015
@@ -558,6 +558,8 @@ FileSpec::RemoveBackupDots (const ConstS
         {
             if (had_dots)
             {
+                while (before_sep.startswith("//"))
+                    before_sep = before_sep.substr(1);
                 if (!before_sep.empty())
                 {
                     result.append(before_sep.data(), before_sep.size());





More information about the lldb-commits mailing list