Downloaded office docs from mail, they're treated as archives

Problem on 2 KDE installs, basically the same but for nvidia driver on one.

Download attached documents* from email**, open by clicking on the icon in dolphin. They open with ark. Okay, close ark, right-click, menu shows “open with libreoffice calc” (or writer as appropriate) and "open with => " where the arrow points to a submenu that includes wps office on my installation. (I haven’t yet tried uninstalling wps office to see if that makes a difference, because I only just thought of it.)

But wait, there’s more. Having opened with libreoffice (or WPS office), make some change, save and close. Now icon in dolphin shows as a zip. Inspect properties, file type shows as zip. Right click menu no longer offers libreoffice as a choice.

I notice when downloading multiple attachments from the same message in gmail, that they come as an archive, to be extracted, though this doesn’t happen with single files. Still it got me wondering, do mail handlers archive attachments for transmission and set some kind of flag in the process, one that overrides the extension itself, and if so, how can I remove that flag?

*extension.docx, .xls, .xlsm that I remember for sure. PDF did not have the problem.
**tested download from gmail webclient and tutanota local client, tested send through those services and also outlook webclient.

I initially noticed this on spreadsheets I use for work (the xlsm I mentioned), whose provenance I can’t verify, but my test included docs created for the purpose, fresh from libreoffice (or MS-office on a windows source). That is, the word “test” was the sole content, they opened normally prior to being emailed, and they they behaved as I decribed after being emailed.

If anyone else is talking about a problem like this on the interwebs, proving it is beyond my goo-fu. Has anyone here seen the like?

GEF

PS: I haven’t yet filed a bug report; not sure which component has the bug. I’m not even sure if it’s KDE or Tumbleweed related because I don’t presentlay have anything else setup to test.

AFAIK all libreoffice and office files are just structured zips, that open with the associated application. Apparently something messed up their associations, so dolphin use the actual file type application to open it. This actual file type IINM is an ID code called magic number, which allow linux to open files without extensions.

You can check your associations in system-settings>applications>file associations (I’m translating from pt_BR, so it may differ is your language).

Perhaps WPS messed them in some way?

For example, here (oS 42.3) I copied a .odt and a .docx file to another name, without extension. Clicking the odt, even without extension, open it in libreoffice (because of that magic number, I think), but the .docx open in arc. With the .docx extension in place the file open is opened in libreoffice.

Thanks, that’s something I haven’t tried. However, I have the extensions in place, and in system settings those extensions show that libreoffice is the default. I didn’t know about magic numbers, gives me another search term.

Make sure that in Systemsettings5 > File Associations LibreOffice Writer / Calc etc is selected as the default application to open docx, xlsx etc. Or, right click such a file, pick Open With …, select Writer, Calc etc. and check ‘Always open with this application’