aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Unix/Path.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Unix/Path.inc')
-rw-r--r--lib/Support/Unix/Path.inc11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Support/Unix/Path.inc b/lib/Support/Unix/Path.inc
index b21245c820..886ba6bf6d 100644
--- a/lib/Support/Unix/Path.inc
+++ b/lib/Support/Unix/Path.inc
@@ -242,12 +242,11 @@ Path::GetLLVMDefaultConfigDir() {
Path
Path::GetUserHomeDirectory() {
const char* home = getenv("HOME");
- if (home) {
- Path result;
- if (result.set(home))
- return result;
- }
- return GetRootDirectory();
+ Path result;
+ if (home && result.set(home))
+ return result;
+ result.set("/");
+ return result;
}
Path