SamePartitions / Problem with INI setting

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
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

SamePartitions / Problem with INI setting

Post by *funkymonk »

TC 11.00b6 x32 (but it was the same with TC10.52 and maybe even earlier)

In the options or the INI file you can specify which drive letters belong to partitions on the same storage medium.
Of course this is important for some file operations, but the the way in which TC changes the "SamePartitions" entry leads to a very unpleasant side effect:
  1. Delete the SamePartitions entry completely from the INI or set "SamePartitions=".
  2. Start TC and go to Options -> Copy/Delete
    --> TC determines the drive letters to partitions on the same medium **automatically** and displays them (here: "E,F,D,C" -- a strange order BTW).
  3. Don't change anything in the options and simply press "OK".
    --> The just determined drive letters are written into the INI (here: "SamePartitions=E,F,D,C").
    --> As soon as the INI entry exists, TC uses this information and does not determine it again (this is basically ok).
The problem is:
If one uses TC portable on several computers, then the just changed "SamePartitions" entry will be used on other computers, although it is (possibly) not correct there.

Suggestion:
"SamePartitions=*" could be supported to tell TC to automatically determine the drive letters to partitions on the same medium at every launch, but **not** to enter them into the INI.
This would facilitate the portable use of TC with the same INI.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SamePartitions / Problem with INI setting

Post by *ghisler(Author) »

I could remove the "SamePartitions" ini value when the values in the edit box are the same as the default for the PC. The downside is that the user couldn't set that exact value via settings dialog any more.
Author of Total Commander
https://www.ghisler.com
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: SamePartitions / Problem with INI setting

Post by *funkymonk »

ghisler(Author) wrote: 2023-06-11, 09:14 UTC I could remove the "SamePartitions" ini value when the values in the edit box are the same as the default for the PC.
I would keep the INI value untouched. Some users might want to specify the drive letters manually...
ghisler(Author) wrote: 2023-06-11, 09:14 UTC The downside is that the user couldn't set that exact value via settings dialog any more.
Thus my suggestion with the * (asterisk):
"SamePartitions=*" could be supported to tell TC to automatically determine the drive letters to partitions on the same medium at every launch, but **not** to enter them into the INI.

In the Options dialog, a user can then still specify specific letters *xor* the asterisk.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SamePartitions / Problem with INI setting

Post by *ghisler(Author) »

OK, I will keep it in the INI, and only write a new value when the edit box content is different from what it was before.
Btw, the default value is an empty string, so when you clear the field, it will be removed from the ini and TC will use the default values.
Author of Total Commander
https://www.ghisler.com
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: SamePartitions / Problem with INI setting

Post by *funkymonk »

ghisler(Author) wrote: 2023-06-12, 09:30 UTC OK, I will keep it in the INI, and only write a new value when the edit box content is different from what it was before.
Sounds good for now.
ghisler(Author) wrote: 2023-06-12, 09:30 UTC Btw, the default value is an empty string, so when you clear the field, it will be removed from the ini and TC will use the default values.
True, clearing the text box and saving the settings will remove the entire SamePartitions entry from the INI.
But: If you go back to the copy/delete options the text box is populated again. Pressing ok will again write it into the INI.

Why don't you display the **auto-detected** SamePartitions as information in a (non-editable) label, and keep the text box for explicitly overwriting the auto-detected drive letters? This way, clearing the text box results in "SamePartitions=" in the INI and simply means "auto".
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: SamePartitions / Problem with INI setting

Post by *funkymonk »

Side note/suggestion:

It would be nice if the copy/move dialog would display
* the currently used copy method and
* whether TC assumes the src/dst drives to be on the same/different drive.

I don't want to pollute the copy dialog but I believe this information is quite interesting for some users.
Maybe this information should only show up if the copy method is not standard (for experts :wink:).
(And: Especially for users of a portable TC, they might quickly see a if SamePartitions and the copy settings are correct with regard to the currently used PC.)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SamePartitions / Problem with INI setting

Post by *ghisler(Author) »

But: If you go back to the copy/delete options the text box is populated again.
Yes, that's the default value used when no value is given.
Pressing ok will again write it into the INI.
That's why I will make the above mentioned change, so that doesn't happen.
Author of Total Commander
https://www.ghisler.com
User avatar
funkymonk
Senior Member
Senior Member
Posts: 416
Joined: 2013-12-04, 09:56 UTC

Re: SamePartitions / Problem with INI setting

Post by *funkymonk »

12.06.23 Fixed: Configuration - Options - Copy/Delete: Only save list of partitions on same drive if changed by the user (32/64)
Thank you for the update.
However, I find the current approach not optimal.

In the options, the textbox shows *either* (a) the entry from the INI if available *or* (b) the automatically detected drive letters.

However, you *can't* tell if it's (a) or (b)!

Wouldn't it make sense to display both (also to see the difference between the ini setting and the auto detected drive letters)?
Thus, I repeat my suggestion from above:
Why don't you display the **auto-detected** SamePartitions as information in a (non-editable) label, and keep the text box for explicitly overwriting the auto-detected drive letters?
To save space, the existing label can be shortened if necessary:
E.g. in German:

Code: Select all

"Laufwerksbuchstaben auf gleichem Medium (auto: CD,EFG): <textbox-with-current-setting>"
The currently shown "(Example: CDE,FGH)" is certainly not needed. There is the help for it and with other options there are also no examples.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: SamePartitions / Problem with INI setting

Post by *ghisler(Author) »

Sorry, I will not change that.
Author of Total Commander
https://www.ghisler.com
Post Reply