diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp --- a/lldb/source/Core/IOHandlerCursesGUI.cpp +++ b/lldb/source/Core/IOHandlerCursesGUI.cpp @@ -1297,8 +1297,11 @@ if (!IsSpecified()) return; - FileSpec file(GetPath()); - if (m_need_to_exist && !FileSystem::Instance().Exists(file)) { + if (!m_need_to_exist) + return; + + FileSpec file = GetResolvedFileSpec(); + if (!FileSystem::Instance().Exists(file)) { SetError("File doesn't exist!"); return; } @@ -1308,7 +1311,17 @@ } } - // Returns the path of the file. + FileSpec GetFileSpec() { + FileSpec file_spec(GetPath()); + return file_spec; + } + + FileSpec GetResolvedFileSpec() { + FileSpec file_spec(GetPath()); + FileSystem::Instance().Resolve(file_spec); + return file_spec; + } + const std::string &GetPath() { return m_content; } protected: @@ -1327,8 +1340,11 @@ if (!IsSpecified()) return; - FileSpec file(GetPath()); - if (m_need_to_exist && !FileSystem::Instance().Exists(file)) { + if (!m_need_to_exist) + return; + + FileSpec file = GetResolvedFileSpec(); + if (!FileSystem::Instance().Exists(file)) { SetError("Directory doesn't exist!"); return; } @@ -1338,7 +1354,17 @@ } } - // Returns the path of the file. + FileSpec GetFileSpec() { + FileSpec file_spec(GetPath()); + return file_spec; + } + + FileSpec GetResolvedFileSpec() { + FileSpec file_spec(GetPath()); + FileSystem::Instance().Resolve(file_spec); + return file_spec; + } + const std::string &GetPath() { return m_content; } protected: