Bug 344658

Summary: Konsole saves profile to wrong path
Product: [Applications] konsole Reporter: Siddhartha <kde>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: normal CC: cpigat242, nate
Priority: NOR Keywords: investigated, triaged
Version: 3.90.900   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description Siddhartha 2015-02-28 11:45:24 UTC
My install path is /opt/kde5 using kdesrc-build as my own user, so I have writable permissions to /opt/kde5/share/konsole/Shell.profile. Due to this and the path not matching QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation).last() (ProfileWriter.cpp:45), all my profile changes are written to /opt/kde5/share/konsole/Shell.profile and not to ~/.local. So everytime I do a build, the Shell.profile is replaced with a new file.

I can see that QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation is ("/home/sdh/.kde5/local", "/opt/kde5/share", "/usr/share"), so maybe the code should check all entries instead of just the last entry?

Reproducible: Always

Steps to Reproduce:
1. Save changes to a profile. Save path is wrong.
2. Compile and install from source

Actual Results:  
Saved changes are replaced with new file

Expected Results:  
Saved changes should go to user home
Comment 1 Nate Graham 2018-10-20 22:59:53 UTC
Not able to reproduce in git master. the last() call has been removed, so all locations are now checked.