summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/FileSpec.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2014-09-12 23:04:40 +0000
committerJim Ingham <jingham@apple.com>2014-09-12 23:04:40 +0000
commit2f21bbc804acaf929b54b958652554f1a7a27ae2 (patch)
treeedbedafcd321a59b676043f2cfe81b397ba85755 /lldb/source/Host/common/FileSpec.cpp
parent2614db1a130bee7d261d4cea1734b3d379092992 (diff)
downloadbcm5719-llvm-2f21bbc804acaf929b54b958652554f1a7a27ae2.tar.gz
bcm5719-llvm-2f21bbc804acaf929b54b958652554f1a7a27ae2.zip
Revert 217719, that wasn't the right fix, that should complete user names, and
anyway /Vol doesn't complete correctly either. Somehow we're chopping the names up incorrectly before passing them into the completer. llvm-svn: 217720
Diffstat (limited to 'lldb/source/Host/common/FileSpec.cpp')
-rw-r--r--lldb/source/Host/common/FileSpec.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp
index d011d39d88d..19846d243ed 100644
--- a/lldb/source/Host/common/FileSpec.cpp
+++ b/lldb/source/Host/common/FileSpec.cpp
@@ -66,9 +66,9 @@ FileSpec::ResolveUsername (llvm::SmallVectorImpl<char> &path)
llvm::StringRef path_str(path.data());
size_t slash_pos = path_str.find_first_of("/", 1);
- if (slash_pos == 1 || path_str.size() == 1)
+ if (slash_pos == 1)
{
- // A path of the form ~ or ~/ resolves to the current user's home dir
+ // A path of ~/ resolves to the current user's home dir
llvm::SmallString<64> home_dir;
if (!llvm::sys::path::home_directory(home_dir))
return;
OpenPOWER on IntegriCloud