| Index: base/file_util_posix.cc
|
| diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
|
| index c7014b637718ce7333c4bebd3b63192fed4a5dea..4eda5423c714c6e36b684230ea2b31e53b0d057a 100644
|
| --- a/base/file_util_posix.cc
|
| +++ b/base/file_util_posix.cc
|
| @@ -150,15 +150,6 @@ static std::string TempFileName() {
|
| #endif
|
| }
|
|
|
| -bool AbsolutePath(FilePath* path) {
|
| - base::ThreadRestrictions::AssertIOAllowed(); // For realpath().
|
| - char full_path[PATH_MAX];
|
| - if (realpath(path->value().c_str(), full_path) == NULL)
|
| - return false;
|
| - *path = FilePath(full_path);
|
| - return true;
|
| -}
|
| -
|
| int CountFilesCreatedAfter(const FilePath& path,
|
| const base::Time& comparison_time) {
|
| base::ThreadRestrictions::AssertIOAllowed();
|
| @@ -301,15 +292,16 @@ bool CopyDirectory(const FilePath& from_path,
|
| // This function does not properly handle destinations within the source
|
| FilePath real_to_path = to_path;
|
| if (PathExists(real_to_path)) {
|
| - if (!AbsolutePath(&real_to_path))
|
| + real_to_path = real_to_path.AsAbsolute();
|
| + if (real_to_path.empty())
|
| return false;
|
| } else {
|
| - real_to_path = real_to_path.DirName();
|
| - if (!AbsolutePath(&real_to_path))
|
| + real_to_path = real_to_path.DirName().AsAbsolute();
|
| + if (real_to_path.empty())
|
| return false;
|
| }
|
| - FilePath real_from_path = from_path;
|
| - if (!AbsolutePath(&real_from_path))
|
| + FilePath real_from_path = from_path.AsAbsolute();
|
| + if (real_from_path.empty())
|
| return false;
|
| if (real_to_path.value().size() >= real_from_path.value().size() &&
|
| real_to_path.value().compare(0, real_from_path.value().size(),
|
|
|