Skip to content

Commit df929cf

Browse files
committed
System/Path/Windows: Change GetRootDirectory to return file:/// instead of C:/.
llvm-svn: 118502
1 parent 4b263dd commit df929cf

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/include/llvm/System/Path.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ namespace sys {
8989
/// Construct a path to the root directory of the file system. The root
9090
/// directory is a top level directory above which there are no more
9191
/// directories. For example, on UNIX, the root directory is /. On Windows
92-
/// it is C:\. Other operating systems may have different notions of
92+
/// it is file:///. Other operating systems may have different notions of
9393
/// what the root directory is or none at all. In that case, a consistent
9494
/// default root directory will be used.
9595
static Path GetRootDirectory();

llvm/lib/System/Win32/Path.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,9 +233,9 @@ Path::GetTemporaryDirectory(std::string* ErrMsg) {
233233
// FIXME: the following set of functions don't map to Windows very well.
234234
Path
235235
Path::GetRootDirectory() {
236-
Path result;
237-
result.set("C:/");
238-
return result;
236+
// This is the only notion that that Windows has of a root directory. Nothing
237+
// is here except for drives.
238+
return Path("file:///");
239239
}
240240

241241
void

0 commit comments

Comments
 (0)