diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 09:24:03 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 09:24:03 +0000 |
commit | 000aa254e3089acb0f8574972e6ced26787dded7 (patch) | |
tree | d759cec06d4aeffd0c02dbd188db934e5a6733d7 /base/file_util_posix.cc | |
parent | 40ea4676ba7ecc4d8cf124703f3344ce5bd12163 (diff) | |
download | chromium_src-000aa254e3089acb0f8574972e6ced26787dded7.zip chromium_src-000aa254e3089acb0f8574972e6ced26787dded7.tar.gz chromium_src-000aa254e3089acb0f8574972e6ced26787dded7.tar.bz2 |
first cut
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11102 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_posix.cc')
-rw-r--r-- | base/file_util_posix.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/base/file_util_posix.cc b/base/file_util_posix.cc index 6d3984e..85cdc10 100644 --- a/base/file_util_posix.cc +++ b/base/file_util_posix.cc @@ -142,7 +142,7 @@ bool CopyDirectory(const FilePath& from_path, std::string suffix(&ent->fts_path[from_path.value().size()]); // Strip the leading '/' (if any). if (!suffix.empty()) { - DCHECK(suffix[0] == '/'); + DCHECK_EQ('/', suffix[0]); suffix.erase(0, 1); } const FilePath target_path = to_path.Append(suffix); @@ -157,6 +157,7 @@ bool CopyDirectory(const FilePath& from_path, } // Try creating the target dir, continuing on it if it exists already. + // Rely on the user's umask to produce correct permissions. if (mkdir(target_path.value().c_str(), 0777) != 0) { if (errno != EEXIST) error = errno; @@ -185,10 +186,12 @@ bool CopyDirectory(const FilePath& from_path, break; case FTS_SL: // Symlink. case FTS_SLNONE: // Symlink with broken target. - LOG(WARNING) << "CopyDirectory() skipping symbolic link."; + LOG(WARNING) << "CopyDirectory() skipping symbolic link: " << + ent->fts_path; continue; case FTS_DEFAULT: // Some other sort of file. - LOG(WARNING) << "CopyDirectory() skipping weird file."; + LOG(WARNING) << "CopyDirectory() skipping file of unknown type: " << + ent->fts_path; continue; default: NOTREACHED(); |