Comment #12 on issue 10876 by [email protected]: "Always open files of
this type" seems to be case sensitive
http://code.google.com/p/chromium/issues/detail?id=10876
The following revision refers to this bug:
http://src.chromium.org/viewvc/chrome?view=rev&revision=30323
------------------------------------------------------------------------
r30323 | [email protected] | 2009-10-27 22:40:09 -0700 (Tue, 27
Oct 2009) | 18 lines
Changed paths:
M
http://src.chromium.org/viewvc/chrome/trunk/src/base/file_path.cc?r1=30323&r2=30322
M
http://src.chromium.org/viewvc/chrome/trunk/src/base/file_path.h?r1=30323&r2=30322
M
http://src.chromium.org/viewvc/chrome/trunk/src/base/file_path_unittest.cc?r1=30323&r2=30322
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/download/download_manager.cc?r1=30323&r2=30322
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/download/download_manager.h?r1=30323&r2=30322
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/download/download_shelf.cc?r1=30323&r2=30322
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/download/download_util.cc?r1=30323&r2=30322
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/net/url_fixer_upper_unittest.cc?r1=30323&r2=30322
M
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/shell_integration_win.cc?r1=30323&r2=30322
Fix for bug 10876 that resulted in some refactoring:
The bug originates from extensions being treated case sensitive on Windows
and Mac OSX, where they shouldn't be.
Therefore I added generic static methods to FilePath to compare strings in
the same way the file system does, and changed the relevant parts of the
code to make use of them.
I tested the methods under Windows and Mac OS X. I also wrote a basic
version for Linux/Posix that behaves the same way as the original code, so
there should at least be no regression.
Also, while fixing this I found some confusion in the code about whether
extensions are used with or without leading dot. For this reason I changed
some functions that were taking an extension as parameter to instead take
the whole file path. This makes calling these functions easier and the
caller doesn't need to know whether the extension is supposed to be with or
without dot.
In the same vein, I split DownloadManager::IsExecutable into
IsExecutableFile, where one again passes in the whole file and doesn't have
to worry about getting the extension right, and IsExecutableExtension,
which corresponds to the original functionality. Ideally only the former
method should be public, but that again would have required further code
scrubbing that was (even more) outside of the original bug fix.
Finally, fixed a wrong comment in the file path tests.
BUG=10876
TEST=FilePathTest.MatchesExtension, .CompareIgnoreCase
Review URL: http://codereview.chromium.org/149796
------------------------------------------------------------------------
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---