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

Issue 306060: Do not allow GTK File Chooser dialogs to return directories. This is probably... (Closed)

Created:
11 years, 2 months ago by Lei Zhang
Modified:
9 years, 7 months ago
Reviewers:
Evan Stade
CC:
chromium-reviews_googlegroups.com, ben+cc_chromium.org
Visibility:
Public.

Description

Do not allow GTK File Chooser dialogs to return directories. This is probably a regression in newer versions of GTK. BUG=23595 TEST=In Jaunty, attempt to attach /usr/bin in Gmail. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=30425

Patch Set 1 #

Total comments: 7

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Total comments: 2

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+66 lines, -14 lines) Patch
M chrome/browser/gtk/dialogs_gtk.cc View 1 2 3 4 chunks +66 lines, -14 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Lei Zhang
11 years, 2 months ago (2009-10-22 22:38:32 UTC) #1
Evan Stade
http://codereview.chromium.org/306060/diff/1/2 File chrome/browser/gtk/dialogs_gtk.cc (right): http://codereview.chromium.org/306060/diff/1/2#newcode10 Line 10: #include "base/file_util.h" nit: include file_path as well http://codereview.chromium.org/306060/diff/1/2#newcode490 ...
11 years, 2 months ago (2009-10-22 23:01:20 UTC) #2
Lei Zhang
http://codereview.chromium.org/306060/diff/1/2 File chrome/browser/gtk/dialogs_gtk.cc (right): http://codereview.chromium.org/306060/diff/1/2#newcode10 Line 10: #include "base/file_util.h" On 2009/10/22 23:01:21, Evan Stade wrote: ...
11 years, 2 months ago (2009-10-23 00:48:34 UTC) #3
Lei Zhang
ping.
11 years, 1 month ago (2009-10-28 22:06:08 UTC) #4
Evan Stade
lgtm http://codereview.chromium.org/306060/diff/1/2 File chrome/browser/gtk/dialogs_gtk.cc (right): http://codereview.chromium.org/306060/diff/1/2#newcode10 Line 10: #include "base/file_util.h" On 2009/10/23 00:48:34, Lei Zhang ...
11 years, 1 month ago (2009-10-28 22:16:29 UTC) #5
Lei Zhang
http://codereview.chromium.org/306060/diff/3001/4001 File chrome/browser/gtk/dialogs_gtk.cc (right): http://codereview.chromium.org/306060/diff/3001/4001#newcode478 Line 478: gint response_id, On 2009/10/28 22:16:29, Evan Stade wrote: ...
11 years, 1 month ago (2009-10-28 22:30:00 UTC) #6
Evan Stade
http://codereview.chromium.org/306060/diff/7002/7003 File chrome/browser/gtk/dialogs_gtk.cc (right): http://codereview.chromium.org/306060/diff/7002/7003#newcode502 Line 502: // the file selection dialog. nit: the reason ...
11 years, 1 month ago (2009-10-29 00:37:41 UTC) #7
Lei Zhang
11 years, 1 month ago (2009-10-29 01:11:01 UTC) #8
On 2009/10/29 00:37:41, Evan Stade wrote:
> http://codereview.chromium.org/306060/diff/7002/7003
> File chrome/browser/gtk/dialogs_gtk.cc (right):
> 
> http://codereview.chromium.org/306060/diff/7002/7003#newcode502
> Line 502: // the file selection dialog.
> nit: the reason it's ok is because it's silly to optimize out a single stat
when
> the dialog just did like a million stats. I doubt it's true the file selection
> dialog *necessarily* just accessed it (consider when the user types the name
in
> manually and hits enter quickly)

The GTK file dialog tries to auto complete what you're typing, so it probably
doing some stats. The one more stat won't hurt argument works too.

> http://codereview.chromium.org/306060/diff/7002/7003#newcode504
> Line 504: if (file_util::GetFileInfo(path, &file_info) &&
> !file_info.is_directory) {
> I just remembered: there's a file_util function that checks if a file is a
> directory. You should use that.

Done.

Powered by Google App Engine
This is Rietveld 408576698