Fixed copying read-only directories
commitda4b0f2ba723c28734781887f759a969eea9191a
authorripp <ripp@yandex-team.ru>
Mon, 27 Oct 2014 09:59:53 +0000 (27 02:59 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 27 Oct 2014 10:00:07 +0000 (27 10:00 +0000)
treef49a5d8f65d4c199849b2c740ad7808ec6c3bc57
parent8dd227f0f84d74d6c054923e6803ab26db80049b
Fixed copying read-only directories

While directory copying, the original code creates top-level directory
with the same permissions as source one. So if source directory is
read-only, the newly created directory is also read-only, and neither files
nor subdirectories can't be created in it

R=rvargas@chromium.org

TEST=Unit test was updated to check such a use case

Review URL: https://codereview.chromium.org/659303002

Cr-Commit-Position: refs/heads/master@{#301332}
base/files/file_util_posix.cc
base/files/file_util_unittest.cc