Bug 371194

Summary: Can't edit autostart items
Product: [Frameworks and Libraries] frameworks-kio Reporter: Antonio Rojas <arojas>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: aria, kdelibs-bugs, marco_silva85
Priority: NOR    
Version: 5.27.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.28
Sentry Crash Report:

Description Antonio Rojas 2016-10-18 21:57:49 UTC
It is not possible to edit autostart items from the systemsettings kcm, the KPropertiesDialog tries to write to the wrong file

Reproducible: Always

Steps to Reproduce:
Try to edit an autostart item from the autostart kcm

Actual Results:  
"Could not save properties. You do not have sufficient access to write to /home/user/.local/share/applications/t/foo.desktop"

Expected Results:  
The edited desktop file should be saved to /home/user/.config/autostart/foo.desktop
Comment 1 Antonio Rojas 2016-10-31 20:37:58 UTC
Git commit af0105c22ec80e411bf226e77f40987464e478d3 by Antonio Rojas.
Committed on 31/10/2016 at 20:36.
Pushed by arojas into branch 'master'.

Fix editing autostart entries when /usr/local/share/applications doesn't exist

QFileInfo.canonicalFilePath() returns an empty string for non-existant directories, which matches any .desktop file path and makes
KPropertiesDialog try to save it to the wrong location. Make sure that the dir exists before trying to match it in the .desktop file path
REVIEW: 129280
FIXED-IN: 5.28

M  +2    -1    src/widgets/kpropertiesdialog.cpp

http://commits.kde.org/kio/af0105c22ec80e411bf226e77f40987464e478d3
Comment 2 Antonio Rojas 2016-10-31 20:40:36 UTC
*** Bug 361433 has been marked as a duplicate of this bug. ***
Comment 3 Antonio Rojas 2016-10-31 20:41:08 UTC
*** Bug 370636 has been marked as a duplicate of this bug. ***