Index: base/file_util_win.cc |
diff --git a/base/file_util_win.cc b/base/file_util_win.cc |
index 47c59cf344f92f00bc39edbb15fbb308aa497c97..ce1ffc1dccb38cf23559de450b52d2059a7e1933 100644 |
--- a/base/file_util_win.cc |
+++ b/base/file_util_win.cc |
@@ -403,7 +403,8 @@ bool CreateNewTempDirectory(const FilePath::StringType& prefix, |
return CreateTemporaryDirInDir(system_temp_dir, prefix, new_temp_path); |
} |
-bool CreateDirectory(const FilePath& full_path) { |
+bool CreateDirectoryAndGetError(const FilePath& full_path, |
+ base::PlatformFileError* error) { |
base::ThreadRestrictions::AssertIOAllowed(); |
// If the path exists, we've succeeded if it's a directory, failed otherwise. |
@@ -429,7 +430,7 @@ bool CreateDirectory(const FilePath& full_path) { |
if (parent_path.value() == full_path.value()) { |
return false; |
} |
- if (!CreateDirectory(parent_path)) { |
+ if (!CreateDirectory(parent_path, error)) { |
DLOG(WARNING) << "Failed to create one of the parent directories."; |
return false; |
} |
@@ -443,6 +444,7 @@ bool CreateDirectory(const FilePath& full_path) { |
// race to create the same directory. |
return true; |
} else { |
+ *error = base::LastErrorToPlatformFileError(error_code); |
jar (doing other things)
2013/06/07 23:32:49
I think you forget to check for a null pointer.
dgrogan
2013/06/07 23:35:50
Fixed.
|
DLOG(WARNING) << "Failed to create directory " << full_path_str |
<< ", last error is " << error_code << "."; |
return false; |