| Index: base/file_util_posix.cc
|
| diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc
|
| index 018a48dde19058be24928cef3acb50ad1f5f391e..f438253761dd98ef220c40f65adf306b4bbcdf6e 100644
|
| --- a/base/file_util_posix.cc
|
| +++ b/base/file_util_posix.cc
|
| @@ -227,7 +227,7 @@ bool CopyDirectory(const FilePath& from_path,
|
|
|
| // This function does not properly handle destinations within the source
|
| FilePath real_to_path = to_path;
|
| - if (file_util::PathExists(real_to_path)) {
|
| + if (PathExists(real_to_path)) {
|
| real_to_path = MakeAbsoluteFilePath(real_to_path);
|
| if (real_to_path.empty())
|
| return false;
|
| @@ -309,6 +309,11 @@ bool CopyDirectory(const FilePath& from_path,
|
| return success;
|
| }
|
|
|
| +bool PathExists(const FilePath& path) {
|
| + ThreadRestrictions::AssertIOAllowed();
|
| + return access(path.value().c_str(), F_OK) == 0;
|
| +}
|
| +
|
| } // namespace base
|
|
|
| // -----------------------------------------------------------------------------
|
| @@ -324,11 +329,6 @@ using base::MakeAbsoluteFilePath;
|
| using base::RealPath;
|
| using base::VerifySpecificPathControlledByUser;
|
|
|
| -bool PathExists(const FilePath& path) {
|
| - base::ThreadRestrictions::AssertIOAllowed();
|
| - return access(path.value().c_str(), F_OK) == 0;
|
| -}
|
| -
|
| bool PathIsWritable(const FilePath& path) {
|
| base::ThreadRestrictions::AssertIOAllowed();
|
| return access(path.value().c_str(), W_OK) == 0;
|
|
|