| Index: webrtc/base/unixfilesystem.cc
|
| diff --git a/webrtc/base/unixfilesystem.cc b/webrtc/base/unixfilesystem.cc
|
| index d0da7098104e59e8c2704a47ee0622b003b6f6ba..557c478774db6d38490f9e0de81c3ef7b9a75504 100644
|
| --- a/webrtc/base/unixfilesystem.cc
|
| +++ b/webrtc/base/unixfilesystem.cc
|
| @@ -204,12 +204,7 @@ bool UnixFilesystem::MoveFile(const Pathname &old_path,
|
| LOG(LS_VERBOSE) << "Moving " << old_path.pathname()
|
| << " to " << new_path.pathname();
|
| if (rename(old_path.pathname().c_str(), new_path.pathname().c_str()) != 0) {
|
| - if (errno != EXDEV)
|
| - return false;
|
| - if (!CopyFile(old_path, new_path))
|
| - return false;
|
| - if (!DeleteFile(old_path))
|
| - return false;
|
| + return false;
|
| }
|
| return true;
|
| }
|
| @@ -221,31 +216,6 @@ bool UnixFilesystem::IsFolder(const Pathname &path) {
|
| return S_ISDIR(st.st_mode);
|
| }
|
|
|
| -bool UnixFilesystem::CopyFile(const Pathname &old_path,
|
| - const Pathname &new_path) {
|
| - LOG(LS_VERBOSE) << "Copying " << old_path.pathname()
|
| - << " to " << new_path.pathname();
|
| - char buf[256];
|
| - size_t len;
|
| -
|
| - StreamInterface *source = OpenFile(old_path, "rb");
|
| - if (!source)
|
| - return false;
|
| -
|
| - StreamInterface *dest = OpenFile(new_path, "wb");
|
| - if (!dest) {
|
| - delete source;
|
| - return false;
|
| - }
|
| -
|
| - while (source->Read(buf, sizeof(buf), &len, nullptr) == SR_SUCCESS)
|
| - dest->Write(buf, len, nullptr, nullptr);
|
| -
|
| - delete source;
|
| - delete dest;
|
| - return true;
|
| -}
|
| -
|
| bool UnixFilesystem::IsTemporaryPath(const Pathname& pathname) {
|
| #if defined(WEBRTC_ANDROID) || defined(WEBRTC_MAC)
|
| RTC_DCHECK(provided_app_temp_folder_ != nullptr);
|
|
|