| Index: runtime/bin/file_win.cc
|
| diff --git a/runtime/bin/file_win.cc b/runtime/bin/file_win.cc
|
| index 185cce2903076d13f625c6d31e75446b12503c9a..8352c4901dab1774f2194a32080941542e0c8867 100644
|
| --- a/runtime/bin/file_win.cc
|
| +++ b/runtime/bin/file_win.cc
|
| @@ -121,8 +121,11 @@ bool File::IsAbsolutePath(const char* pathname) {
|
|
|
|
|
| char* File::GetCanonicalPath(const char* pathname) {
|
| - // TODO(176): Need to implement this.
|
| - return strdup(pathname);
|
| + int required_size = GetFullPathName(pathname, 0, NULL, NULL);
|
| + char* path = static_cast<char*>(malloc(required_size));
|
| + int written = GetFullPathName(pathname, required_size, path, NULL);
|
| + ASSERT(written == (required_size - 1));
|
| + return path;
|
| }
|
|
|
|
|
|
|