diff options
Diffstat (limited to 'source/Host/common/FileCache.cpp')
-rw-r--r-- | source/Host/common/FileCache.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/Host/common/FileCache.cpp b/source/Host/common/FileCache.cpp index b4629255c852..17833ef2cbb3 100644 --- a/source/Host/common/FileCache.cpp +++ b/source/Host/common/FileCache.cpp @@ -10,6 +10,7 @@ #include "lldb/Host/FileCache.h" #include "lldb/Host/File.h" +#include "lldb/Host/FileSystem.h" using namespace lldb; using namespace lldb_private; @@ -25,14 +26,13 @@ FileCache &FileCache::GetInstance() { lldb::user_id_t FileCache::OpenFile(const FileSpec &file_spec, uint32_t flags, uint32_t mode, Status &error) { - std::string path(file_spec.GetPath()); - if (path.empty()) { + if (!file_spec) { error.SetErrorString("empty path"); return UINT64_MAX; } FileSP file_sp(new File()); - error = file_sp->Open(path.c_str(), flags, mode); - if (file_sp->IsValid() == false) + error = FileSystem::Instance().Open(*file_sp, file_spec, flags, mode); + if (!file_sp->IsValid()) return UINT64_MAX; lldb::user_id_t fd = file_sp->GetDescriptor(); m_cache[fd] = file_sp; |