Bug 412166

Summary: Dolphin Not refreshing/loosing file association when renaming files
Product: [Applications] dolphin Reporter: Hunter Breathat <breathat.hunter>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: justin.zobel, kfm-devel, meven29, postix
Priority: NOR    
Version: 19.08.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=244163
https://bugs.kde.org/show_bug.cgi?id=387663
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Just after filename change

Description Hunter Breathat 2019-09-21 16:29:34 UTC
Created attachment 122784 [details]
Just after filename change

SUMMARY
Dolphin loses file association upon renaming of the file. File type affected ppt, pptx etc. From local testing, it appears any doctype that is "compressed" once renamed it treats the file as a zip file and is not updated until a refresh. 


STEPS TO REPRODUCE
1. Have the default dolphin setup from Manjaro
2. Rename a ppt/pptx/doc/docx file

OBSERVED RESULT
File association is lost. Treated as a compressed file.

EXPECTED RESULT
File association to remain the same

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro 18.1
(available in About System)
KDE Plasma Version: 5.16.4
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.0

ADDITIONAL INFORMATION
Comment 1 Justin Zobel 2021-06-21 03:19:13 UTC
I believe this is because Microsoft office documents are actually compressed archives. It only knows it's an Office document because of the extension likely.
Comment 2 Méven Car 2023-10-16 07:44:50 UTC
(In reply to Justin Zobel from comment #1)
> I believe this is because Microsoft office documents are actually compressed
> archives. It only knows it's an Office document because of the extension
> likely.

It is more likely a bug in KCoreDirLister, after a file is renamed, KFileItem::refresh() is called to update the new file state, that does not update the mimetype correctly.