New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 752375 link

Starred by 8 users

Issue metadata

Status: Fixed
Owner:
OoO until Feb 4th
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 3
Type: Bug



Sign in to add a comment

Chromium tries to save everything as .bin in KDialog

Reported by darkwing...@gmail.com, Aug 4 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Log into Plasma session
2. Try to download any file
3. Save dialog box will try to default file extension to .bin on every file except HTML files

What is the expected behavior?
Option to default file extension should stick to original extension (jpg/png for pictures, iso for disk images, etc.)

What went wrong?
Chromium with KDialog will try to default file extension to .bin

Did this work before? Yes Not sure

Chrome version: 59.0.3071.115  Channel: stable
OS Version: Manjaro
Flash Version: Shockwave Flash 26.0 r0
 
Components: -Internals>Network UI>Browser>Downloads
Is this just happening on a particular site, or are downloads on all websites defaulting to .bin?

It is every site to the best of my knowledge. I've noticed it doesn't happen when I try to save the page, but if I try to save an image by right-clicking on Imgur or download an Ubuntu ISO from Ubuntu's website, for example, it will default to .bin. Unchecking the option to pick the file extension for me has prevented the problem for now.

Comment 3 by dah...@chromium.org, Aug 10 2017

Labels: Needs-Feedback
This is most likely an issue with kdialog. Can you provide a screenshot of what you are seeing?
Here is a screenshot. The checkbox for auto-selecting the file extension should either have .iso selected or greyed out entirely. Firefox w/ kmozillahelper and Libreoffice, in my testing, do not have this problem.
Screenshot_20170810_164451.png
74.3 KB View Download
Project Member

Comment 5 by sheriffbot@chromium.org, Aug 10 2017

Cc: dah...@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "dahlke@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
@dahlke -- A friendly ping. Could you please look into the issue.

Thanks!
Labels: Needs-Milestone

Comment 8 by dah...@chromium.org, Sep 21 2017

Cc: -dah...@chromium.org
Labels: -Pri-2 Pri-3
Owner: shaktisahu@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: pnangunoori@chromium.org timbrown@chromium.org
 Issue 783149  has been merged into this issue.
Cc: xingliu@chromium.org sc00335...@techmahindra.com dah...@chromium.org raphael....@intel.com thomasanderson@chromium.org
 Issue 778513  has been merged into this issue.
Cc: shaktisahu@chromium.org
Owner: raphael....@intel.com
Status: Started (was: Assigned)
Labels: -Type-Bug-Regression -Needs-Milestone M-66 Type-Bug
Project Member

Comment 13 by bugdroid1@chromium.org, Jan 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c97cb6fa570ca93fe93a34a85ff88be5c51e8b92

commit c97cb6fa570ca93fe93a34a85ff88be5c51e8b92
Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Mon Jan 29 19:57:07 2018

libgtkui: Use application/octet-stream as the last option in the KDE code

We were previously using an std::set<std::string> to filter out mime type
duplicates, optionally adding the "application/octet-stream" mime type to
the set before joining all items as a single string to pass to the
kdialog invocation.

This used to work fine with the KDE4-based kdialog, whose underlying
KFileDialog ended up creating a custom file type filter with all entries and
suggesting the proper file extension. The KDE Frameworks 5-based kdialog
that was released a few months ago uses a simple QFileDialog, and the
filter's entries are added in the order they are passed to kdialog.

In practice, this means that downloading a PDF file (or any file whose mime
type ended up coming after "application/octet-stream" when iterating our
std::set) causes kdialog to be invoked like this:

    kdialog [...] --getsavefilename /path/to/Downloads/foo.pdf \
                  application/octet-stream application/pdf

KDE4 kdialog suggests "foo.pdf" as the name and adds "unknown, PDF
document", "unknown" and "PDF document" to the filter list. KF5 kdialog
suggests "foo.bin" as the name and adds "unknown" and "PDF document" to the
filter list.

We now make sure that "application/octet-stream" is the last mime type we
pass to kdialog so that any other more specific mime type is chosen as the
default and we do not always try to add the ".bin" extension to the files we
are saving.

Bug:  752375 
Change-Id: I56a458042823c52beada9c1819c2ee4b8b8e5e30
Reviewed-on: https://chromium-review.googlesource.com/891160
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Reviewed-by: Elliot Glaysher <erg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532556}
[modify] https://crrev.com/c97cb6fa570ca93fe93a34a85ff88be5c51e8b92/chrome/browser/ui/libgtkui/select_file_dialog_impl_kde.cc

Status: Fixed (was: Started)
Labels: TE-NeedsTriageFromHYD
The issue can't be verified from ET team due to the lack of KDE plasma set up. Hence, forwarding it to inhouse team for verification of the issue on opensuse as per the screenshot in comment #4.

Thanks...!!
Cc: susanjun...@techmahindra.com
 Issue 810344  has been merged into this issue.
Cc: susanjuniab@chromium.org
 Issue 771601  has been merged into this issue.
Issue is fixed as of now. Only one thing. Filter should be default to whatever extension the the file is download to. If I download jpeg, it default should be to jpeg instead of unknown. Check the attachment above.
Screenshot_20180216_015113.png
89.2 KB View Download
Can you file a separate bug about that (and CC me there), preferably with an easy way to reproduce the issue?
Cc: sindhu.chelamcherla@chromium.org
 Issue 816404  has been merged into this issue.

Sign in to add a comment