Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2695)

Unified Diff: base/file_util_posix.cc

Issue 5286010: Start using file_util symlink code, now that it's available. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review change Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/command_line.cc ('k') | base/process_util_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « base/command_line.cc ('k') | base/process_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698