Index: base/file_util_posix.cc |
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc |
index e71051eca763f5c51890e10cb04a75d037c8d708..92527c88c0a87e4e2aae9321af5d1062458eb710 100644 |
--- a/base/file_util_posix.cc |
+++ b/base/file_util_posix.cc |
@@ -388,11 +388,12 @@ bool ReadSymbolicLink(const FilePath& symlink_path, |
char buf[PATH_MAX]; |
ssize_t count = ::readlink(symlink_path.value().c_str(), buf, arraysize(buf)); |
- if (count <= 0) |
+ if (count <= 0) { |
+ target_path->clear(); |
return false; |
+ } |
*target_path = FilePath(FilePath::StringType(buf, count)); |
- |
return true; |
} |