You are not logged in.
So depending on the contents of text files they might get their mime type changed to x-wine-extension-ini. When changing the contents, the mime type will immediately update.
I first noticed this with my yazi.toml file as yazi wasn't able to open it. I then removed as much as I could from it and was left with this file that still gets the changed mime type, but if I delete anything from this the mime type becomes the normal text/plain (I can't have a code block end with an empty line or it will get trimmed so I just wrote it in there):
[
[o]
<empty line>This even happens when making a new text file and typing those contents in it.
I tried following both wine mime association removal sections from here, but they didn't change anything.
I also only have wine installed through Steam and Bottles, but not the actual package.
Last edited by Ratainen (2026-03-26 14:17:20)
Offline
get their mime type changed to x-wine-extension-ini
According to what tool?
The mime type is heuristically derived from the suffix and the content, https://wiki.archlinux.org/title/Wine#U … sociations will prevent eg. xdg-open from opening files w/ wine
mimetype from https://archlinux.org/packages/?name=perl-file-mimeinfo should™ detect foo.toml as toml file (because of the extension)
Offline
According to both
xdg-mime query filetype ...and
file --mime-type ...That other mimetype tool you linked though detected the type correctly. Weirdly enough xdg-open seems to automatically use that instead and work when I installed it, but yazi is still failing to open files, because of that wine mime.
And I already tried those steps of removing the associations.
Offline
The issue is fixed in upstream file's git by https://github.com/file/file/commit/0a2 … fec2e8f7a1 while at the same time causing check to fail:
Running test: ../tests/CVE-2014-1943
TZ=UTC MAGIC=../magic/magic ./test -e ../tests/CVE-2014-1943.testfile ../tests/CVE-2014-1943.result
test: ERROR: result was (len 36)
ASCII text, with no line terminators
expected (len 30)
Apple Driver Map, blocksize 0
../tests/CVE-2014-1943.testfile: ASCII text, with no line terminators
make[2]: *** [Makefile:819: check-local] Error 1Last edited by loqs (2026-03-23 07:48:55)
Offline
That check failure seems to have just gotten fixed, but even after switching to the file git version the problem stays.
Though I can at least fix the biggest problem from this by switching yazi to use the mime-ext.yazi plugin that just checks the file extension for the app to run, but that breaks some other functionality.
Last edited by Ratainen (2026-03-23 17:01:51)
Offline
That check failure seems to have just gotten fixed, but even after switching to the file git version the problem stays.
https://github.com/file/file/commit/fba … b1a6566e5d which fixes check reintroduces the issue. Can you reproduce the issue with that commit reverted?
Offline
Yeah, the issue seems to happen even with that version if I build it with the checks disabled.
Also I don't know if this is irrelevant as the latest commits fixed the checks, but the check that fails for me is different:
Running test: ../tests/android-vdex-1
TZ=UTC MAGIC=../magic/magic ./test -e ../tests/android-vdex-1.testfile ../tests/android-vdex-1.result
../tests/android-vdex-1.testfile: Android vdex file,
test: ERROR: result was (len 18)
Android vdex file,
expected (len 124)
Android vdex file, verifier deps version: 021, dex section version: 002, number of dex files: 4, verifier deps size: 106328
make[2]: *** [Makefile:819: check-local] Error 1Offline
even with that version
What version, https://github.com/file/file/commit/fba … b1a6566e5d or https://github.com/file/file/commit/c26 … bba7f566a2 (the commit before)?
Or git master w/ https://github.com/file/file/commit/fba … b1a6566e5d reverted?
Offline
If the issue is still there with file's current git HEAD I suggest opening an issue on https://bugs.astron.com. I can not see if one exists already as you need to register even to view issues.
Last edited by loqs (2026-03-24 21:17:24)
Offline
Okay I think I now know what's going on in here. The x-wine-extension-ini mime type is for the windows ini file which can look identical to toml files.
For example this should be both a valid ini and toml file.
[Abc]
Num1 = 123
[Def]
Num2 = 456So I guess it's not technically a bug, because the point of the file utility seems to be to guess the file type from the contents instead of the extension.
I think I have to fix this from the yazi config, but for some reason adding an open rule with "application/x-wine-extension-ini" does not seem to work.
{ mime = "application/x-wine-extension-ini", use = "edit" }Though I don't know if this is getting too yazi specific now and I should just ask for help there.
Offline
Okay I think I now know what's going on in here. The x-wine-extension-ini mime type is for the windows ini file which can look identical to toml files.
I do not believe the regular expressions file uses to identify Windows ini should be matching though as they are looking for very specific strings https://github.com/file/file/blob/FILE5 … 1131-L1160
@seth what do you think?
Offline
File git master detects #10 as "application/x-wine-extension-ini; charset=us-ascii" which is probably wrong.
The reason is the block starting at 1266 - hold on…
The cause is https://github.com/file/file/commit/7a1 … 677ea9c7b5
The comment *explicitly* states
# characters, digits, underscore and white space followed by right bracket
# terminated by CR implies section line to skip BOOTLOG.TXT DETLOG.TXT
Not LF - maybe the idea was CRLF?
Last edited by seth (2026-03-25 21:02:45)
Offline
Trying to get a comment on the commit.
Offline
Reverted upstream, https://github.com/file/file/commit/f37 … 3af7a8e223
Do we need a downstream bug to pick the patch?
(Upstream release frequency seems ~1.5 pa, there's precedent, https://gitlab.archlinux.org/archlinux/ … 1c8dbf8ff1 )
Offline
Oh well, I do love being confidently wrong.
Updating to the latest commit now fixes the issue, but yeah this should probably be fixed downstream so that there wouldn't be a need to use the git version for almost a year just for that fix.
Thanks a lot for the help, I guess I can mark this as solved now.
Last edited by Ratainen (2026-03-26 14:18:22)
Offline
Offline