Bug 344658 - Konsole saves profile to wrong path
Summary: Konsole saves profile to wrong path
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 3.90.900
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2015-02-28 11:45 UTC by Siddhartha
Modified: 2018-10-20 22:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.