Inconsistency in user data transfer to RedirectSection=

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Inconsistency in user data transfer to RedirectSection=

Post by *Slavic »

According to TC manual, we can redirect any section of wincmd.ini configuration file to a user-defined *.ini file by including the line
RedirectSection=
in each desired section. While the redirection itself, when created, works as intended, the previously stored in wincmd.ini data are transferred to new file inconsistently: some sections are transferred (old data are copied at first run, then new lines are added), while come others are not transferred (old data aren't copied, remaining in wincmd.ini unused and not visible in drop-down boxes, new lines are added to empty list). I tested all history sections, which include paths, files and names.

Initial wincmd.ini is located in C:\Users\<User_name>\AppData\Roaming\GHISLER\
The redirect line which was added to sections:
[Section_name]
RedirectSection=tc_user.ini
(existing lines...)

Results in tc_user.ini:
[SearchText] - not transferred
[SearchName] - not transferred
[SearchIn] - not transferred
[MkDirHistory] - not transferred
[NewFileHistory] - not transferred

[Command line history] - transferred
[RightHistory] - transferred
[LeftHistory] - transferred
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Inconsistency in user data transfer to RedirectSection=

Post by *ghisler(Author) »

This happens because TC completely ignores the remaining contents of a section when it has a line starting with RedirectSection=

The [Command line history], [RightHistory] and [LeftHistory] sections were loaded at program start, updated in menory, and were written back to the ini when you closed TC. Apparently you added RedirectSection= in the meantime, so the reading was from the main ini, and the writing went to the new ini.

The other sections are only loaded when using the associated functions, e.g. the search or mk dir function.
Author of Total Commander
https://www.ghisler.com
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: Inconsistency in user data transfer to RedirectSection=

Post by *Dalai »

I thought it's like Ghisler explained it. To be honest, I think it's the user's responsibility to copy/move the section contents to the redirected file when a RedirectSection key is added.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Slavic
Senior Member
Senior Member
Posts: 290
Joined: 2006-02-26, 15:41 UTC
Location: Montenegro

Re: Inconsistency in user data transfer to RedirectSection=

Post by *Slavic »

Well, I see that it's more a side effect of design, not too obvious for common user, but it has an internal logic, why some sections are loaded instantly while some others aren't. Yes, I used TC to open wincmd.ini in edit mode and added the redirect lines; I guess that other users more certainly would do the same (instead of "pure way" to exit TC, edit *.ini, save and start TC again). Should such logic be explained in Help? It can be, although this is a rare case.

Anyway, it's not a bug in new version in common meaning, so this thread may be counted resolved.
Desktop: Windows 11 Pro 23H2, TC 11.03(RC). Mobile: Pixel 5a, Android 14, TC 3.42b5
Post Reply