Index: base/files/file_util_mac.mm |
diff --git a/base/files/file_util_mac.mm b/base/files/file_util_mac.mm |
index 695935a2e31fe162b1690b1b3d28f60c4e09d732..acac8d738ea1d52e68e70be9c7e4357816d72807 100644 |
--- a/base/files/file_util_mac.mm |
+++ b/base/files/file_util_mac.mm |
@@ -14,16 +14,15 @@ |
#include "base/threading/thread_restrictions.h" |
namespace base { |
-namespace internal { |
-bool CopyFileUnsafe(const FilePath& from_path, const FilePath& to_path) { |
+bool CopyFile(const FilePath& from_path, const FilePath& to_path) { |
ThreadRestrictions::AssertIOAllowed(); |
+ if (from_path.ReferencesParent() || to_path.ReferencesParent()) |
+ return false; |
return (copyfile(from_path.value().c_str(), |
to_path.value().c_str(), NULL, COPYFILE_DATA) == 0); |
} |
-} // namespace internal |
- |
bool GetTempDir(base::FilePath* path) { |
NSString* tmp = NSTemporaryDirectory(); |
if (tmp == nil) |