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

Issue 79045: Fixes saving files that don't have valid extensions. (Closed)

Created:
11 years, 8 months ago by Avi (use Gerrit)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Fixes saving files that don't have valid extensions. Two fixes here. First was a disturbing discovery that FilePath::Extension returns an extension starting with a period. I am of the belief that this is the wrong API to expose, but that's a different fight. Fixed. Second is a subtle behavior of the old code that wasn't preserved. In the case where the extension did not exist in the registry, the old code dropped the extension from the filter. We now also do so. BUG=10561 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=13960

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -1 line) Patch
M chrome/browser/download/download_manager.cc View 1 chunk +2 lines, -0 lines 1 comment Download
M chrome/browser/download/save_package.cc View 1 chunk +2 lines, -0 lines 3 comments Download
M chrome/common/win_util.h View 1 chunk +3 lines, -0 lines 1 comment Download
M chrome/common/win_util.cc View 1 chunk +6 lines, -1 line 1 comment Download

Messages

Total messages: 6 (0 generated)
Avi (use Gerrit)
11 years, 8 months ago (2009-04-17 18:05:09 UTC) #1
scherkus (not reviewing)
LGTM however I'm not familiar with this code :( http://codereview.chromium.org/79045/diff/1008/1010 File chrome/browser/download/save_package.cc (right): http://codereview.chromium.org/79045/diff/1008/1010#newcode1 Line ...
11 years, 8 months ago (2009-04-17 19:36:41 UTC) #2
Avi (use Gerrit)
http://codereview.chromium.org/79045/diff/1008/1010 File chrome/browser/download/save_package.cc (right): http://codereview.chromium.org/79045/diff/1008/1010#newcode1025 Line 1025: file_type_info.extensions[0][0].erase(0, 1); // drop the . On 2009/04/17 ...
11 years, 8 months ago (2009-04-17 19:43:53 UTC) #3
scherkus (not reviewing)
just another comment http://codereview.chromium.org/79045/diff/1008/1009 File chrome/browser/download/download_manager.cc (right): http://codereview.chromium.org/79045/diff/1008/1009#newcode645 Line 645: file_type_info.extensions[0][0].erase(0, 1); // drop the ...
11 years, 8 months ago (2009-04-17 19:45:07 UTC) #4
sky
LGTM.
11 years, 8 months ago (2009-04-20 16:21:54 UTC) #5
Evan Stade
11 years, 8 months ago (2009-04-20 19:35:24 UTC) #6
this is not the first time that the FilePath::Extension() function has bitten
someone. On the other hand, file_util::GetFileExtensionFromPath() returns the
extension with no period. Intuitive, right?

Powered by Google App Engine
This is Rietveld 408576698