Bug 440752 - Wishlist: xdg-mime/baloo should recognise user.mime_type extended attributes
Summary: Wishlist: xdg-mime/baloo should recognise user.mime_type extended attributes
Status: REPORTED
Alias: None
Product: frameworks-kfilemetadata
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.84.0
Platform: Neon Linux
: NOR wishlist
Target Milestone: ---
Assignee: Pinak Ahuja
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-08 18:42 UTC by tagwerk19
Modified: 2021-08-08 18:42 UTC (History)
0 users

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 tagwerk19 2021-08-08 18:42:49 UTC
SUMMARY:

    xdg-mime (and baloo) does not seem to recognise user.mime_type
    extended attributes. These are referenced as a "MAY" in:

        https://www.freedesktop.org/wiki/CommonExtendedAttributes/#generalattributesincurrentuse 

    so request flagged as "wishlist" 

STEPS TO REPRODUCE:

    Create a test file with no recognised file extension, check the
    mime type with xdg-mime

        $ echo "Hello Penguin" > testfile.zzz
        $ xdg-mime query filetype testfile.zzz
        text/plain 

    Assign a "preferred" mime_type with setfattr:

        $ setfattr -n user.mime_type -v "text/log" testfile.zzz 

    Check with xdg-mime and balooshow -x

OBSERVED RESULTS

    $ xdg-mime query filetype testfile.zzz
    text/plain

    $ balooshow -x testfile.zzz
    13f8960000fc01 64513 1308822 testfile.zzz [/home/test/testfile.zzz]
            Mtime: 1628337068 2021-08-07T13:51:08
            Ctime: 1628337804 2021-08-07T14:03:24
            Cached properties:
                    Line Count: 1

    Internal Info
    Terms: Mplain Mtext T5 T8 X20-1 hello penguin
    File Name Terms: Ftestfile Fzzz
    XAttr Terms:
    lineCount: 1 

EXPECTED RESULTS

    The mimetype is shown as  "text/log"

SOFTWARE/OS VERSIONS

    Neon Testing
     
    Plasma : 5.22.4
    Frameworks : 5.85.0
    Qt : 5.15.5 

 ADDITIONAL INFORMATION

    This would be a way to override "misidentified" mimetypes as seen in
    Bug 440631 and Bug 440632