From 81d03f3a8fe5044375a53d121eefdc742a7fc9da Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Wed, 13 Mar 2019 15:54:18 +0000 Subject: [PATCH] Make sure FileSystem::Resolve preserves the path/file distinction. This should finally fix TestPaths.py. llvm-svn: 356057 --- lldb/source/Host/common/FileSystem.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp index 7ce8634..0c88405 100644 --- a/lldb/source/Host/common/FileSystem.cpp +++ b/lldb/source/Host/common/FileSystem.cpp @@ -264,7 +264,10 @@ void FileSystem::Resolve(FileSpec &file_spec) { Resolve(path); // Update the FileSpec with the resolved path. - file_spec.SetPath(path); + if (file_spec.GetFilename().IsEmpty()) + file_spec.GetDirectory().SetString(path); + else + file_spec.SetPath(path); file_spec.SetIsResolved(true); } -- 2.7.4