summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandCompletions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandCompletions.cpp')
-rw-r--r--lldb/source/Commands/CommandCompletions.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp
index 5f0d494443f..fd84e1c4f85 100644
--- a/lldb/source/Commands/CommandCompletions.cpp
+++ b/lldb/source/Commands/CommandCompletions.cpp
@@ -176,7 +176,10 @@ static int DiskFilesOrDirectories(const llvm::Twine &partial_name,
if (PartialItem == ".")
PartialItem = llvm::StringRef();
- assert(!SearchDir.empty());
+ if (SearchDir.empty()) {
+ llvm::sys::fs::current_path(Storage);
+ SearchDir = Storage;
+ }
assert(!PartialItem.contains(path::get_separator()));
// SearchDir now contains the directory to search in, and Prefix contains the
OpenPOWER on IntegriCloud