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

Unified Diff: base/files/file_util_posix.cc

Issue 659303002: Fixed copying read-only directories (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Cosmetic changes according to review Created 6 years, 2 months 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 | « no previous file | base/files/file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_util_posix.cc
diff --git a/base/files/file_util_posix.cc b/base/files/file_util_posix.cc
index 561f5c7e6615ac45fcd7e44ea35ab9a4343bc4a8..9c6b3a24b4c09f373e0c8354a24b80a1cceafcab 100644
--- a/base/files/file_util_posix.cc
+++ b/base/files/file_util_posix.cc
@@ -321,7 +321,9 @@ bool CopyDirectory(const FilePath& from_path,
}
if (S_ISDIR(from_stat.st_mode)) {
- if (mkdir(target_path.value().c_str(), from_stat.st_mode & 01777) != 0 &&
+ if (mkdir(target_path.value().c_str(),
+ (from_stat.st_mode & 01777) | S_IRUSR | S_IXUSR | S_IWUSR) !=
+ 0 &&
errno != EEXIST) {
DLOG(ERROR) << "CopyDirectory() couldn't create directory: "
<< target_path.value() << " errno = " << errno;
« no previous file with comments | « no previous file | base/files/file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698