summaryrefslogtreecommitdiffstats
path: root/base/path_service.cc
diff options
context:
space:
mode:
authormmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-11 16:09:11 +0000
committermmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-11 16:09:11 +0000
commit806b9c6f00c6d21259d049d21ebea52de9b47663 (patch)
tree4f5130957bf055d7371a5d6621063e6616cc340d /base/path_service.cc
parente6f84f1438b160aab349b417bbd9eea34bd3568e (diff)
downloadchromium_src-806b9c6f00c6d21259d049d21ebea52de9b47663.zip
chromium_src-806b9c6f00c6d21259d049d21ebea52de9b47663.tar.gz
chromium_src-806b9c6f00c6d21259d049d21ebea52de9b47663.tar.bz2
CreateDirectory() should check if an existing path is actually a directory before skipping it. Also update a couple instances and comments to reflect current behaviour (see also http://codereview.chromium.org/1681).
Review URL: http://codereview.chromium.org/1709 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/path_service.cc')
-rw-r--r--base/path_service.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/base/path_service.cc b/base/path_service.cc
index 37ac433..078815d 100644
--- a/base/path_service.cc
+++ b/base/path_service.cc
@@ -205,9 +205,7 @@ bool PathService::Override(int key, const std::wstring& path) {
return false;
// make sure the directory exists:
- if (!file_util::PathExists(file_path) &&
- // TODO(darin): what if this path is not that of a directory?
- !file_util::CreateDirectory(file_path))
+ if (!file_util::CreateDirectory(file_path))
return false;
file_util::TrimTrailingSeparator(&file_path);
@@ -251,4 +249,3 @@ void PathService::RegisterProvider(ProviderFunc func, int key_start,
#endif
path_data->providers = p;
}
-