Bug 177339 - kfile, when determining file type, only looks at the file extension, not content
Summary: kfile, when determining file type, only looks at the file extension, not content
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
: 191847 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-09 21:15 UTC by Ben Bucksch
Modified: 2019-12-06 19:17 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Bucksch 2008-12-09 21:15:02 UTC
Version:            (using KDE 3.5.9)
OS:                Linux
Installed from:    SuSE RPMs

Minimal testcase:

Reproduction:
index.pdf is a valid PDF file.
$ kfile index.pdf index.pdf: PDF-Dokument (application/pdf)
$ cp index.pdf index.html
$ kfile index.html index.html: HTML-Dokument (text/html)
$ file index.html index.html: PDF document, version 1.3

Actual result:
kfile only looks at the file extension.

Expected result:
|file| correctly determines the file type based on the content. If anything, |kfile| should be smarter than |file|.
Where |file| is available, use that to determine file type.


Real-life bug:
See bug 127008 comment 9.
Comment 1 Māris Nartišs 2010-01-25 12:46:47 UTC
This bug is still valid for 4.3.4, still IMHO it's a dupe of bug #191847 (and yes, it's a bug).
Comment 2 Andrew Crouthamel 2018-11-02 22:55:09 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Ben Bucksch 2018-11-02 23:01:44 UTC
No reason to believe that this has been fixed.
Comment 4 Ben Bucksch 2018-11-02 23:03:07 UTC
*** Bug 191847 has been marked as a duplicate of this bug. ***
Comment 5 Christoph Feck 2018-11-27 01:29:41 UTC
Which package/repository does contain 'kfile'? Is this 'kmimetypefinder5'?
Comment 6 Nate Graham 2019-12-06 19:17:21 UTC
kfile no longer exists, and this functionality is now provided by shared-mime-into (a FreeDesktop standard) which handles this use case just fine.