diff options
Diffstat (limited to 'lldb/source/Host/posix/FileSystemPosix.cpp')
-rw-r--r-- | lldb/source/Host/posix/FileSystemPosix.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Host/posix/FileSystemPosix.cpp b/lldb/source/Host/posix/FileSystemPosix.cpp index 32fae68abb4d7..0aa34bc594359 100644 --- a/lldb/source/Host/posix/FileSystemPosix.cpp +++ b/lldb/source/Host/posix/FileSystemPosix.cpp @@ -1,4 +1,4 @@ -//===-- FileSystem.cpp ------------------------------------------*- C++ -*-===// +//===-- FileSystemPosix.cpp -----------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -43,7 +43,7 @@ Status FileSystem::Symlink(const FileSpec &src, const FileSpec &dst) { Status FileSystem::Readlink(const FileSpec &src, FileSpec &dst) { Status error; char buf[PATH_MAX]; - ssize_t count = ::readlink(src.GetCString(), buf, sizeof(buf) - 1); + ssize_t count = ::readlink(src.GetPath().c_str(), buf, sizeof(buf) - 1); if (count < 0) error.SetErrorToErrno(); else { @@ -72,9 +72,11 @@ Status FileSystem::ResolveSymbolicLink(const FileSpec &src, FileSpec &dst) { } FILE *FileSystem::Fopen(const char *path, const char *mode) { + Collect(path); return llvm::sys::RetryAfterSignal(nullptr, ::fopen, path, mode); } int FileSystem::Open(const char *path, int flags, int mode) { + Collect(path); return llvm::sys::RetryAfterSignal(-1, ::open, path, flags, mode); } |