| Summary: | DirSelect Dialog saves history in kdeglobals | ||
|---|---|---|---|
| Product: | [Plasma] plasma-integration | Reporter: | Shreyansh Jain <mr.shreyanshk> |
| Component: | general | Assignee: | Plasma Bugs List <plasma-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | 4wy78uwh, code, elvis.angelaccio, kde |
| Priority: | NOR | ||
| Version First Reported In: | 5.13.4 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| See Also: | https://bugs.kde.org/show_bug.cgi?id=499179 | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Shreyansh Jain
2018-10-20 04:03:20 UTC
It is configuration and as such belongs in .config and this will not be changed. However, it shouldn't be writing into kdeglobals but the app-specific config file, e.g dolphinrc. Can you pin-point which application does those writes? Judging from plasma-integration code it shouldn't be writing into kdeglobals. (In reply to Kai Uwe Broulik from comment #1) > Can you pin-point which application does those writes? I can offer to follow your instructions as I have no idea on how pin-point it. It occurs sporadically and I don't know what triggers it. > It is configuration and as such belongs in .config and this will not be changed. Please reconsider. Configuration files should not change frequently (unless application version changes) and ideally should remain static and portable between machines. The program generates fields like this: ``` [DirSelect Dialog] DirSelectDialog Size=640,480 History Items[$e]=file:///some/path/on/local/computer ``` Clearly, these fields are set on runtime and change frequently. More appropriate location for this data is in "$HOME/.local". I'm adding user profile to VCS and these fields make me push a new commit everyday. I use git to sync my configuration across various machines and they're not holding anything that needs to be taken when switching computers. Can confirm KDirSelectDialog is saving history into ~/.config/kdeglobals. With today's Plasma 6.3, saving history when selecting directories seems redundant. None of the programs I tried (KDE and non-KDE) actually read this history nor have a recents menu because the program will set the initial folder. ($HOME in most cases) Regarding my last comment, I made a mistake. Turns out history is used for the combo box (drop down), but obviously will be the same across all applications (globally). Ideally would be stored per-app in the *rc files if it is to be consistent with KFileDialog.
A quick way to test this dialog is with kdialog:
> kdialog --getexistingdirectory [initial path]
This was fixed with the release of KDE 6.5.0. The state and history are now saved at ~/.local/state/kdirselectstaterc instead of ~/.config/kdeglobals * https://invent.kde.org/plasma/plasma-integration/-/merge_requests/189 * https://blogs.kde.org/2025/10/11/this-week-in-plasma-a-massive-amount-of-stability-work-for-plasma-6.5/ |