diff options
| author | Zachary Turner <zturner@google.com> | 2017-03-08 17:56:08 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2017-03-08 17:56:08 +0000 |
| commit | 7d86ee5ab0ca98edff2f07c373967f34227c960e (patch) | |
| tree | 622b630eca7be4ea6b604c8eacc956031dbb8ee9 /lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | |
| parent | 5c13623a69baed43b7f0cbf2912a3baa951285e2 (diff) | |
| download | llvm-7d86ee5ab0ca98edff2f07c373967f34227c960e.tar.gz llvm-7d86ee5ab0ca98edff2f07c373967f34227c960e.tar.bz2 llvm-7d86ee5ab0ca98edff2f07c373967f34227c960e.zip | |
Resubmit FileSystem changes.
This was originall reverted due to some test failures in
ModuleCache and TestCompDirSymlink. These issues have all
been resolved and the code now passes all tests.
Differential Revision: https://reviews.llvm.org/D30698
llvm-svn: 297300
Diffstat (limited to 'lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp')
| -rw-r--r-- | lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 05276294f0e6..a3df09cdc4fa 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -49,6 +49,7 @@ #include "ProcFileReader.h" #include "Procfs.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/Threading.h" #include <linux/unistd.h> @@ -224,9 +225,8 @@ Error NativeProcessProtocol::Launch( // Verify the working directory is valid if one was specified. FileSpec working_dir{launch_info.GetWorkingDirectory()}; - if (working_dir && - (!working_dir.ResolvePath() || - working_dir.GetFileType() != FileSpec::eFileTypeDirectory)) { + if (working_dir && (!working_dir.ResolvePath() || + !llvm::sys::fs::is_directory(working_dir.GetPath()))) { error.SetErrorStringWithFormat("No such file or directory: %s", working_dir.GetCString()); return error; |
