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

Issue 11300011: Don't expand path to use long names in CreateTemporaryFileInDir. (Closed)

Created:
8 years, 1 month ago by asanka
Modified:
8 years, 1 month ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Visibility:
Public.

Description

[Win] Don't call GetLongPathName() in CreateTemporaryFileInDir(). GetLongPathName() can fail if the user doesn't have the necessary privileges on an ancestor directory. If this call failed during CreateTemporaryFileInDir(), the temporary file that was created in the previous GetTempFileName() call will leak. None of the callers rely on the path being expanded on return. So get rid of the call. BUG=155612 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=167189

Patch Set 1 #

Patch Set 2 : Merge with trunk #

Total comments: 1

Patch Set 3 : Address comments and add a unit test #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -7 lines) Patch
M base/file_util_unittest.cc View 1 2 2 chunks +51 lines, -0 lines 0 comments Download
M base/file_util_win.cc View 1 2 1 chunk +9 lines, -7 lines 1 comment Download

Messages

Total messages: 9 (0 generated)
asanka
brettw: I choose you due to http://b/issue?id=595243 . It's only 6 years old. I'm sure ...
8 years, 1 month ago (2012-11-06 22:32:29 UTC) #1
brettw
I defer my review to Carlos. "LGTM" to make the CQ owners check happy.
8 years, 1 month ago (2012-11-06 22:46:13 UTC) #2
asanka
On 2012/11/06 22:46:13, brettw wrote: > I defer my review to Carlos. "LGTM" to make ...
8 years, 1 month ago (2012-11-08 22:52:56 UTC) #3
cpu_(ooo_6.6-7.5)
Sorry for the delay I am on vacation. http://codereview.chromium.org/11300011/diff/7001/base/file_util_win.cc File base/file_util_win.cc (right): http://codereview.chromium.org/11300011/diff/7001/base/file_util_win.cc#newcode396 base/file_util_win.cc:396: *temp_file ...
8 years, 1 month ago (2012-11-09 17:21:47 UTC) #4
asanka
Restored the the GetLongPathName() call, and added a test. http://codereview.chromium.org/11300011/diff/10002/base/file_util_win.cc File base/file_util_win.cc (right): http://codereview.chromium.org/11300011/diff/10002/base/file_util_win.cc#newcode396 base/file_util_win.cc:396: ...
8 years, 1 month ago (2012-11-09 22:02:54 UTC) #5
cpu_(ooo_6.6-7.5)
lgtm
8 years, 1 month ago (2012-11-09 22:47:01 UTC) #6
asanka
On 2012/11/09 22:47:01, cpu wrote: > lgtm Thank you!
8 years, 1 month ago (2012-11-11 04:43:54 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asanka@chromium.org/11300011/10002
8 years, 1 month ago (2012-11-12 15:02:05 UTC) #8
commit-bot: I haz the power
8 years, 1 month ago (2012-11-12 16:28:11 UTC) #9
Change committed as 167189

Powered by Google App Engine
This is Rietveld 408576698