From 3ae9fd29ae29afe72d824a75b5e55f1cafe407ca Mon Sep 17 00:00:00 2001 From: "Michael J. Spencer" Date: Tue, 9 Nov 2010 15:10:45 +0000 Subject: [PATCH] System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/. llvm-svn: 118502 --- include/llvm/System/Path.h | 2 +- lib/System/Win32/Path.inc | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index a3b9ccc1f0a..ca1be63bbbf 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -89,7 +89,7 @@ namespace sys { /// Construct a path to the root directory of the file system. The root /// directory is a top level directory above which there are no more /// directories. For example, on UNIX, the root directory is /. On Windows - /// it is C:\. Other operating systems may have different notions of + /// it is file:///. Other operating systems may have different notions of /// what the root directory is or none at all. In that case, a consistent /// default root directory will be used. static Path GetRootDirectory(); diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc index 8e3004d0ac4..75f6b7134a4 100644 --- a/lib/System/Win32/Path.inc +++ b/lib/System/Win32/Path.inc @@ -233,9 +233,9 @@ Path::GetTemporaryDirectory(std::string* ErrMsg) { // FIXME: the following set of functions don't map to Windows very well. Path Path::GetRootDirectory() { - Path result; - result.set("C:/"); - return result; + // This is the only notion that that Windows has of a root directory. Nothing + // is here except for drives. + return Path("file:///"); } void