Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5813)

Unified Diff: base/file_util_win.cc

Issue 500075: Fix a regression introduced by r33225.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/file_util_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_win.cc
===================================================================
--- base/file_util_win.cc (revision 34723)
+++ base/file_util_win.cc (working copy)
@@ -528,7 +528,11 @@
// Attempt to create the parent recursively. This will immediately return
// true if it already exists, otherwise will create all required parent
// directories starting with the highest-level missing parent.
- if (!CreateDirectory(full_path.DirName())) {
+ FilePath parent_path(full_path.DirName());
+ if (parent_path.value() == full_path.value()) {
+ return false;
+ }
+ if (!CreateDirectory(parent_path)) {
DLOG(WARNING) << "Failed to create one of the parent directories.";
return false;
}
« no previous file with comments | « base/file_util_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698