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

Unified Diff: ui/base/dialogs/select_file_dialog_mac.mm

Issue 10915252: Always include base extension type in Mac select file dialog (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: comment to issue Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/api/file_system/file_system_api.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dialogs/select_file_dialog_mac.mm
diff --git a/ui/base/dialogs/select_file_dialog_mac.mm b/ui/base/dialogs/select_file_dialog_mac.mm
index e0f4003276f0cfa6bd9ea6d77be3bf4a9003eaab..5b66bafb4175788ad76283c49c7ba47015da23c9 100644
--- a/ui/base/dialogs/select_file_dialog_mac.mm
+++ b/ui/base/dialogs/select_file_dialog_mac.mm
@@ -227,6 +227,12 @@ void SelectFileDialogImpl::SelectFileImpl(
base::mac::ScopedCFTypeRef<CFStringRef> uti(
CreateUTIFromExtension(ext_list[j]));
[file_type_set addObject:base::mac::CFToNSCast(uti.get())];
+
+ // Always allow the extension itself, in case the UTI doesn't map
+ // back to the original extension correctly; http://crbug.com/148840
+ base::mac::ScopedCFTypeRef<CFStringRef> ext_cf(
+ base::SysUTF8ToCFStringRef(ext_list[j]));
+ [file_type_set addObject:base::mac::CFToNSCast(ext_cf.get())];
Nico 2012/09/17 08:03:33 Did you file a bug with apple (bugreport.apple.com
thorogood 2012/09/18 02:12:25 Done and done.
}
}
allowed_file_types = [file_type_set allObjects];
« no previous file with comments | « chrome/browser/extensions/api/file_system/file_system_api.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698