Bug 447197

Summary: The size of the krusaderrc file gets too big
Product: [Applications] krusader Reporter: Toni Asensi Esteve <toni.asensi>
Component: generalAssignee: Toni Asensi Esteve <toni.asensi>
Status: RESOLVED FIXED    
Severity: normal CC: krusader-bugs-null, nikita+kde
Priority: NOR Keywords: regression, reproducible, triaged
Version: Git   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Toni Asensi Esteve 2021-12-18 18:35:44 UTC
SUMMARY
The size of the krusaderrc file gets too big, when you close Krusader you see that in that file there's still information about closed tabs.

STEPS TO REPRODUCE
Execute Krusader, open and close several tabs.

OBSERVED RESULT
In the krusaderrc file there's information about the closed tabs.

EXPECTED RESULT
Should the information about closed tabs... be deleted when quitting Krusader?
Comment 1 Toni Asensi Esteve 2021-12-19 23:35:25 UTC
I will try to apply some ideas about solving that.
Comment 2 Nikita Melnichenko 2021-12-22 22:18:46 UTC
Do you mean the [closedTab_*] sections? I also see this. It contains tabs closed in some other sessions. Why do we store closed tabs info in the config at all? I think it should be in-memory only, like with browsers.
Comment 3 Bug Janitor Service 2021-12-25 20:33:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/krusader/-/merge_requests/79
Comment 4 Toni Asensi Esteve 2021-12-25 20:42:40 UTC
> Why do we store closed tabs info in the config at all? I 
> think it should be in-memory only, like with browsers.
It uses the same infrastructure that Krusader has about tabs. The information is saved into the config file in some circumstances, not always. Anyone can propose code that makes it behave in a different way, of course.
Comment 5 Toni Asensi Esteve 2022-01-16 17:34:16 UTC
Git commit 8e63522a48fc78593a22d8a850c1e80c4cf915b1 by Toni Asensi Esteve.
Committed on 16/01/2022 at 17:33.
Pushed by asensi into branch 'master'.

Avoid keeping closed tabs settings (or delete them) in some cases

Avoid keeping closed tabs settings (or delete them) when the limit of
closed tabs is reached, when closing Krusader and when cleaning the
list of closed tabs.

FIXED: [ 447197 ] The size of the krusaderrc file gets too big

Revision: https://invent.kde.org/utilities/krusader/-/merge_requests/79

M  +2    -7    krusader/GUI/recentlyclosedtabsmenu.cpp
M  +3    -0    krusader/krusader.cpp
M  +25   -1    krusader/panelmanager.cpp
M  +8    -0    krusader/panelmanager.h

https://invent.kde.org/utilities/krusader/commit/8e63522a48fc78593a22d8a850c1e80c4cf915b1