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

Issue 141273010: Make CopyDirectory() not copy the read only bit on Windows. (Closed)

Created:
6 years, 11 months ago by M-A Ruel
Modified:
6 years, 10 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, csharp, Vadim Sh.
Visibility:
Public.

Description

Make CopyDirectory() not copy the read only bit on Windows by reimplementing it. Add CopyDirectoryACL test similar to CopyFileACL. Now both CopyDirectory and CopyFile exhibits the same kind of behavior. CopyDirectory is used in unit tests, on Windows installer and on OSX web_application. R=thakis@chromium.org,grt@chromium.org,rvargas@chromium.org BUG=116251 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=249088

Patch Set 1 #

Patch Set 2 : removed stale comment #

Patch Set 3 : Made it gcc friendly by using ASSERT_FALSE() #

Total comments: 8

Patch Set 4 : Remove ifdef, use constants #

Total comments: 3

Patch Set 5 : Rewrote #

Patch Set 6 : whitespace #

Total comments: 19

Patch Set 7 : address review commens #

Total comments: 2

Patch Set 8 : add brackets #

Total comments: 11

Patch Set 9 : braces #

Patch Set 10 : Also fix the place I copied pasted from #

Patch Set 11 : Add comment #

Total comments: 2

Patch Set 12 : Revert change to CopyFileUnsafe #

Unified diffs Side-by-side diffs Delta from patch set Stats (+162 lines, -92 lines) Patch
M base/file_util.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M base/file_util_posix.cc View 1 2 3 4 5 6 7 8 9 4 chunks +6 lines, -7 lines 0 comments Download
M base/file_util_unittest.cc View 1 2 3 4 chunks +69 lines, -33 lines 0 comments Download
M base/file_util_win.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +81 lines, -52 lines 0 comments Download

Messages

Total messages: 39 (0 generated)
M-A Ruel
6 years, 11 months ago (2014-01-17 20:06:56 UTC) #1
M-A Ruel
Dear Nico, can you tell me why on gcc ASSERT_EQ(false, IsReadOnly(...)); doesn't compile but ASSERT_EQ(true, ...
6 years, 11 months ago (2014-01-17 20:29:02 UTC) #2
M-A Ruel
On 2014/01/17 20:29:02, M-A Ruel wrote: > Dear Nico, can you tell me why on ...
6 years, 11 months ago (2014-01-17 20:31:24 UTC) #3
M-A Ruel
FTR, https://codereview.chromium.org/132183007 depends on this CL. Just noting because you already reviewed the other CL.
6 years, 11 months ago (2014-01-17 23:46:40 UTC) #4
Nico
https://codereview.chromium.org/141273010/diff/70001/base/file_util_unittest.cc File base/file_util_unittest.cc (right): https://codereview.chromium.org/141273010/diff/70001/base/file_util_unittest.cc#newcode1363 base/file_util_unittest.cc:1363: #if defined(OS_WIN) || defined(OS_POSIX) What else is there? I ...
6 years, 11 months ago (2014-01-21 04:12:17 UTC) #5
M-A Ruel
On 2014/01/21 04:12:17, Nico wrote: > I don't know if the installer relies on this ...
6 years, 11 months ago (2014-01-21 15:41:35 UTC) #6
M-A Ruel
On 2014/01/21 15:41:35, M-A Ruel wrote: > On 2014/01/21 04:12:17, Nico wrote: > > I ...
6 years, 11 months ago (2014-01-22 13:30:26 UTC) #7
grt (UTC plus 2)
https://codereview.chromium.org/141273010/diff/180001/base/file_util_win.cc File base/file_util_win.cc (right): https://codereview.chromium.org/141273010/diff/180001/base/file_util_win.cc#newcode76 base/file_util_win.cc:76: if (SHFileOperation(&file_operation) != 0) { nit: omit braces for ...
6 years, 11 months ago (2014-01-22 21:27:45 UTC) #8
M-A Ruel
https://codereview.chromium.org/141273010/diff/180001/base/file_util_win.cc File base/file_util_win.cc (right): https://codereview.chromium.org/141273010/diff/180001/base/file_util_win.cc#newcode81 base/file_util_win.cc:81: FileEnumerator f(to_path, true, FileEnumerator::FILES); On 2014/01/22 21:27:45, grt wrote: ...
6 years, 11 months ago (2014-01-23 01:00:50 UTC) #9
erikwright (departed)
Since grt has looked at this I'll leave it to him.
6 years, 11 months ago (2014-01-23 15:05:34 UTC) #10
grt (UTC plus 2)
On 2014/01/23 01:00:50, M-A Ruel wrote: > What about I rip out calls to CopyFile ...
6 years, 11 months ago (2014-01-23 16:19:07 UTC) #11
M-A Ruel
On 2014/01/23 16:19:07, grt wrote: > This sounds okay to me. In addition to making ...
6 years, 11 months ago (2014-01-24 19:52:26 UTC) #12
grt (UTC plus 2)
https://codereview.chromium.org/141273010/diff/360001/base/file_util_posix.cc File base/file_util_posix.cc (right): https://codereview.chromium.org/141273010/diff/360001/base/file_util_posix.cc#newcode266 base/file_util_posix.cc:266: if (strlen(from_path.value().c_str()) >= PATH_MAX) { no need for strlen, ...
6 years, 11 months ago (2014-01-24 20:50:07 UTC) #13
M-A Ruel
https://codereview.chromium.org/141273010/diff/360001/base/file_util_posix.cc File base/file_util_posix.cc (right): https://codereview.chromium.org/141273010/diff/360001/base/file_util_posix.cc#newcode266 base/file_util_posix.cc:266: if (strlen(from_path.value().c_str()) >= PATH_MAX) { On 2014/01/24 20:50:07, grt ...
6 years, 11 months ago (2014-01-24 21:32:57 UTC) #14
grt (UTC plus 2)
lgtm with one final nit https://codereview.chromium.org/141273010/diff/360001/base/file_util_win.cc File base/file_util_win.cc (right): https://codereview.chromium.org/141273010/diff/360001/base/file_util_win.cc#newcode786 base/file_util_win.cc:786: std::vector<char> buffer(64*1024); On 2014/01/24 ...
6 years, 11 months ago (2014-01-26 23:55:08 UTC) #15
M-A Ruel
Thanks! https://codereview.chromium.org/141273010/diff/420001/base/file_util_win.cc File base/file_util_win.cc (right): https://codereview.chromium.org/141273010/diff/420001/base/file_util_win.cc#newcode761 base/file_util_win.cc:761: to_path.value().length() >= MAX_PATH) On 2014/01/26 23:55:08, grt wrote: ...
6 years, 11 months ago (2014-01-27 00:25:35 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maruel@chromium.org/141273010/500001
6 years, 11 months ago (2014-01-27 00:26:07 UTC) #17
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=46525
6 years, 11 months ago (2014-01-27 01:00:26 UTC) #18
M-A Ruel
On 2014/01/27 01:00:26, I haz the power (commit-bot) wrote: > Retried try job too often ...
6 years, 11 months ago (2014-01-27 02:16:01 UTC) #19
M-A Ruel
On 2014/01/27 02:16:01, M-A Ruel wrote: > Nico, can I have approval? 18 hours ping.
6 years, 11 months ago (2014-01-27 20:13:58 UTC) #20
Nico
On 2014/01/27 20:13:58, M-A Ruel wrote: > On 2014/01/27 02:16:01, M-A Ruel wrote: > > ...
6 years, 11 months ago (2014-01-27 20:18:10 UTC) #21
M-A Ruel
On 2014/01/27 20:18:10, Nico wrote: > On 2014/01/27 20:13:58, M-A Ruel wrote: > > On ...
6 years, 11 months ago (2014-01-27 20:19:13 UTC) #22
Nico
lgtm i guess, stampy for the windows bits based on grt's review (I think this ...
6 years, 11 months ago (2014-01-27 20:25:45 UTC) #23
M-A Ruel
https://codereview.chromium.org/141273010/diff/500001/base/file_util_unittest.cc File base/file_util_unittest.cc (right): https://codereview.chromium.org/141273010/diff/500001/base/file_util_unittest.cc#newcode1414 base/file_util_unittest.cc:1414: #if defined(OS_WIN) On 2014/01/27 20:25:46, Nico wrote: > #if ...
6 years, 11 months ago (2014-01-27 20:34:06 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maruel@chromium.org/141273010/650001
6 years, 11 months ago (2014-01-27 20:34:45 UTC) #25
rvargas (doing something else)
https://codereview.chromium.org/141273010/diff/500001/base/file_util_win.cc File base/file_util_win.cc (right): https://codereview.chromium.org/141273010/diff/500001/base/file_util_win.cc#newcode131 base/file_util_win.cc:131: // SHFileOperation(). This used to copy the file attributes ...
6 years, 11 months ago (2014-01-27 20:35:32 UTC) #26
M-A Ruel
One possible avenue is to copy the old CopyDirectory() function into the installer code base, ...
6 years, 11 months ago (2014-01-27 20:42:27 UTC) #27
rvargas (doing something else)
To be clear, my concerns may be addressed by just fixing the comment. If we ...
6 years, 11 months ago (2014-01-27 22:49:17 UTC) #28
M-A Ruel
On 2014/01/27 22:49:17, rvargas wrote: > > > On a separate note, if we go ...
6 years, 10 months ago (2014-01-28 15:23:10 UTC) #29
rvargas (doing something else)
On 2014/01/28 15:23:10, M-A Ruel wrote: > On 2014/01/27 22:49:17, rvargas wrote: > > > ...
6 years, 10 months ago (2014-01-28 20:47:22 UTC) #30
M-A Ruel
On 2014/01/28 20:47:22, rvargas wrote: > On 2014/01/28 15:23:10, M-A Ruel wrote: > > On ...
6 years, 10 months ago (2014-01-28 21:28:03 UTC) #31
rvargas (doing something else)
https://codereview.chromium.org/141273010/diff/670001/base/file_util_win.cc File base/file_util_win.cc (right): https://codereview.chromium.org/141273010/diff/670001/base/file_util_win.cc#newcode754 base/file_util_win.cc:754: // structured storage, NTFS file system alternate data streams, ...
6 years, 10 months ago (2014-01-28 22:40:36 UTC) #32
M-A Ruel
https://codereview.chromium.org/141273010/diff/670001/base/file_util_win.cc File base/file_util_win.cc (right): https://codereview.chromium.org/141273010/diff/670001/base/file_util_win.cc#newcode754 base/file_util_win.cc:754: // structured storage, NTFS file system alternate data streams, ...
6 years, 10 months ago (2014-01-30 14:12:13 UTC) #33
M-A Ruel
Patchset #12 removes the change to CopyFileUnsafe(). This significantly reduce the scope of this change ...
6 years, 10 months ago (2014-02-04 22:29:39 UTC) #34
rvargas (doing something else)
lgtm
6 years, 10 months ago (2014-02-05 02:48:48 UTC) #35
grt (UTC plus 2)
lgtm
6 years, 10 months ago (2014-02-05 13:21:31 UTC) #36
M-A Ruel
The CQ bit was checked by maruel@chromium.org
6 years, 10 months ago (2014-02-05 17:46:42 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/maruel@chromium.org/141273010/680001
6 years, 10 months ago (2014-02-05 17:51:11 UTC) #38
commit-bot: I haz the power
6 years, 10 months ago (2014-02-05 19:55:56 UTC) #39
Message was sent while issue was closed.
Change committed as 249088

Powered by Google App Engine
This is Rietveld 408576698