Bug 356972

Summary: Cannot write a custom icon for a (perhaps new) mimetype
Product: [Frameworks and Libraries] frameworks-kio Reporter: luisfe <luisfe>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kdelibs-bugs, wbauer1
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description luisfe 2015-12-20 22:59:28 UTC
If the folder 
.local/share/mime or .local/share/mime/packages
does not exists, the user cannot choose icon

Reproducible: Always

Steps to Reproduce:
1. Start with a new user and empty directory
2. Try to choose a custom icon for a mimetype, application-x-dvi through the select icon dialog.


Actual Results:  
The is no visible change. Restarting/deleting the icon cache has no effect.
One gets the error:

"""
m_userSpecifiedIcon has changed. Now set to "aapplication-x-dvi"
m_userSpecifiedIcon has changed. Now set to "aapplication-x-dvi"
writing "/home/luisfe/.local/share/mime/packages/application-x-dvi.xml"
Couldn't open "/home/luisfe/.local/share/mime/packages/application-x-dvi.xml" for writing
"""

Expected Results:  
The chosen icon is shown

The obvious workaround is to create the folders 

.local/share/mime
.local/share/mime/packages

After doing this the icon can be set. So the code needs to create these directories if they do not exist.
Comment 1 Wolfgang Bauer 2016-07-23 19:06:32 UTC
This was a bug in kde-cli-tools (keditfiletype) which has been fixed in 5.6.5.

*** This bug has been marked as a duplicate of bug 356237 ***