RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1777053 - "gio info" always returns standard::content-type "text/plain" for empty files, regardless the filename suffix
Summary: "gio info" always returns standard::content-type "text/plain" for empty files...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: glib2
Version: 8.1
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: 8.0
Assignee: Michael Catanzaro
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-26 20:15 UTC by Carlos Santos
Modified: 2023-09-08 12:41 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-19 14:42:14 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNOME Bugzilla 755795 0 Normal RESOLVED 2.46 considers empty files as octet-stream rather than text (leads to gedit not opening those) 2020-10-27 22:18:02 UTC
GNOME Gitlab GNOME/glib/issues/1647 0 None None None 2019-11-27 06:38:12 UTC

Description Carlos Santos 2019-11-26 20:15:53 UTC
Description of problem:

"gio info" always returns standard::content-type "text/plain" for empty files,
regardless the filename suffix.

Version-Release number of selected component (if applicable):

$ rpm -qf $(which gio)
glib2-2.56.4-7.el8.x86_64

How reproducible:

Always

Steps to Reproduce:
1. : > test1.tex
2. echo 'Mary had a little lamb.' > test2.tex
3. gio info test?.tex | fgrep standard::content-type

Actual results:

  standard::content-type: text/plain
  standard::content-type: application/x-tex

Expected results:

  standard::content-type: text/x-tex
  standard::content-type: text/x-tex

Additional info:

The results are a regression, compared to RHEL-6:

[user@rhel-6-1 02502992]$ : > test1.tex
[user@rhel-6-1 02502992]$ echo 'Mary had a little lamb.' > test2.tex
[user@rhel-6-1 02502992]$ gvfs-info test?.tex | fgrep standard::content-type
  standard::content-type: text/x-tex
  standard::content-type: text/x-tex

The same error happens on RHEL-7, in which gvfs-info is a wrapper around gio:

 [user@rhel-7-3 02502992]$ gvfs-info test?.tex | fgrep standard::content-type
This tool has been deprecated, use 'gio info' instead.
See 'gio help info' for more info.

  standard::content-type: text/plain
  standard::content-type: application/x-tex
[user@rhel-7-3 02502992]$ gio info test?.tex | fgrep standard::content-type
  standard::content-type: text/plain
  standard::content-type: application/x-tex

Comment 7 RHEL Program Management 2020-08-19 14:42:14 UTC
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.


Note You need to log in before you can comment on or make changes to this bug.