When calling FileSpec::AppendPathComponent() we don't need to include "." in the path if m_filename is set to exactly '.'. Previously this would cause a FileSpec object that looked like:

m_directory = "/tmp"
m_filename = "."
                                         
To look like:

m_directory = "/tmp/."
m_filename = "foo.txt"

if "foo.txt" was appended to it. With this fix it will be:

m_directory = "/tmp"
m_filename = "foo.txt"

llvm-svn: 250770
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp
index 9efdacb..8885a79 100644
--- a/lldb/source/Host/common/FileSpec.cpp
+++ b/lldb/source/Host/common/FileSpec.cpp
@@ -1431,7 +1431,7 @@
         return;
     }
     StreamString stream;
-    if (m_filename.IsEmpty())
+    if (m_filename.IsEmpty() || (m_filename.GetLength() == 1 && m_filename.GetCString()[0] == '.'))
         stream.Printf("%s/%s", m_directory.GetCString(), new_path);
     else if (m_directory.IsEmpty())
         stream.Printf("%s/%s", m_filename.GetCString(), new_path);