summaryrefslogtreecommitdiffstats
path: root/third_party
diff options
context:
space:
mode:
authordgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-17 00:16:44 +0000
committerdgrogan@chromium.org <dgrogan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-17 00:16:44 +0000
commitd7908418b3a981cf0712e95c67f7d022e080daa3 (patch)
treec6222546b45fa6a691daaf1db9ee37093c74784c /third_party
parentd95dd6b96d7881e168d2c37f049d3d4ab8dd6a32 (diff)
downloadchromium_src-d7908418b3a981cf0712e95c67f7d022e080daa3.zip
chromium_src-d7908418b3a981cf0712e95c67f7d022e080daa3.tar.gz
chromium_src-d7908418b3a981cf0712e95c67f7d022e080daa3.tar.bz2
Don't try to rename LevelDB's LOG file if it doesn't exist
BUG=169328 Review URL: https://chromiumcodereview.appspot.com/11970020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r--third_party/leveldatabase/env_chromium.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/third_party/leveldatabase/env_chromium.cc b/third_party/leveldatabase/env_chromium.cc
index 9f25393..474599c 100644
--- a/third_party/leveldatabase/env_chromium.cc
+++ b/third_party/leveldatabase/env_chromium.cc
@@ -436,7 +436,10 @@ class ChromiumEnv : public Env, public UMALogger {
virtual Status RenameFile(const std::string& src, const std::string& dst) {
Status result;
- if (!::file_util::ReplaceFile(CreateFilePath(src), CreateFilePath(dst))) {
+ FilePath src_file_path = CreateFilePath(src);
+ if (!::file_util::PathExists(src_file_path))
+ return result;
+ if (!::file_util::ReplaceFile(src_file_path, CreateFilePath(dst))) {
result = Status::IOError(src, "Could not rename file.");
RecordErrorAt(kRenamefile);
} else {