Chromium Code Reviews| Index: runtime/bin/file_linux.cc |
| diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc |
| index e28c322982f320141657a44cd30a954c1f74fc0b..f297abec29cd23c2936e44df6e31f2f60623ebed 100644 |
| --- a/runtime/bin/file_linux.cc |
| +++ b/runtime/bin/file_linux.cc |
| @@ -177,6 +177,16 @@ char* File::GetCanonicalPath(const char* pathname) { |
| } |
| +char* File::GetContainingDirectory(char* pathname) { |
| + ASSERT(Exists(pathname)); |
|
Søren Gjesse
2012/02/22 16:13:08
Isn't this ASSERT dangerous? Any file can disappea
Mads Ager (google)
2012/02/22 16:17:27
Good point. Removed on all platforms.
|
| + char* path = NULL; |
| + do { |
| + path = dirname(pathname); |
| + } while (path == NULL && errno == EINTR); |
| + return GetCanonicalPath(path); |
| +} |
| + |
| + |
| const char* File::PathSeparator() { |
| return "/"; |
| } |