summaryrefslogtreecommitdiff
path: root/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:06:29 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:06:29 +0000
commit94994d372d014ce4c8758b9605d63fae651bd8aa (patch)
tree51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
parent39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff)
Notes
Diffstat (limited to 'source/Plugins/Process/Darwin/NativeProcessDarwin.cpp')
-rw-r--r--source/Plugins/Process/Darwin/NativeProcessDarwin.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp b/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
index 3505443abcb0..70d9a5248fd9 100644
--- a/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
+++ b/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
@@ -19,10 +19,10 @@
// C++ includes
// LLDB includes
-#include "lldb/Core/State.h"
#include "lldb/Host/PseudoTerminal.h"
#include "lldb/Target/ProcessLaunchInfo.h"
#include "lldb/Utility/Log.h"
+#include "lldb/Utility/State.h"
#include "lldb/Utility/StreamString.h"
#include "CFBundle.h"
@@ -63,12 +63,13 @@ Status NativeProcessProtocol::Launch(
// Verify the working directory is valid if one was specified.
FileSpec working_dir(launch_info.GetWorkingDirectory());
- if (working_dir &&
- (!working_dir.ResolvePath() ||
- !llvm::sys::fs::is_directory(working_dir.GetPath())) {
- error.SetErrorStringWithFormat("No such file or directory: %s",
+ if (working_dir) {
+ FileInstance::Instance().Resolve(working_dir);
+ if (!FileSystem::Instance().IsDirectory(working_dir)) {
+ error.SetErrorStringWithFormat("No such file or directory: %s",
working_dir.GetCString());
- return error;
+ return error;
+ }
}
// Launch the inferior.