Two similar bugs with locked tabs

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

Moderators: Stefan2, white, sheep, Hacker

Post Reply
User avatar
Vochomurka
Power Member
Power Member
Posts: 769
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Two similar bugs with locked tabs

Post by *Vochomurka » 2017-10-13, 12:25 UTC

Bug #1. One non-closable and many non-activating tabs
How to reproduce:
1) Lock all tabs (only "Locked", but not "Locked, but directory change allowed");
2) Save tabs to tab-file;
2) Open this tab-file in a text editor, and change paths to non-existent ones, provided that the drive is valid.
It is most easy to choose the C:\ drive, and then type some random characters like "kjet83hjew" as a directory name.
For example, here is a sample tab-file:

Code: Select all

[activetabs]
0_path=c:\9f8j4fmqp35tieiu\
0_options=1|0|0|0|0|1|0|
1_path=c:\d8oi04hgop25\
1_options=1|0|0|0|0|1|0|
2_path=c:\msp7oe95kd\
2_options=1|0|0|0|0|1|0|
activetab=0
3) Left-click any tab header and choose "Load tabs from file, replace tabs", then pick created tab-file;
4) One additional tab with C:\ root is created as a last tab;
5) Now the last (rightmost) tab cannot be closed and is always active, and all other tabs cannot be activated but can be closed.

Bug #2. Non-activating tab
How to reproduce:
1) Create a directory (or use an existing one with waste files);
2) Enter it and lock its tab (only "Locked", but not "Locked, but directory change allowed");
3) Drag this tab so that it is not the last (or just open some tabs after it);
4) In another tab delete the directory created in step 1;
5) As before, the tab pointing to the just deleted directory cannot be activated, but can be closed.
Video

Both these situation were caused by usual events: changing of drive names while reinstalling the Windows, or deleting the directory whose tab was locked before.
In fact, in both cases there is an attempt to activate the tab pointing to non-existent directory.
I treat these as bugs because the tab that cannot be activated is not a normal behavior and can confuse the user.
I suppose that the best solution is to display a standard message box like "Path ... is invalid" or, at worst, just to produce the system "Error" sound

siealex
Senior Member
Senior Member
Posts: 222
Joined: 2009-03-22, 16:36 UTC

Post by *siealex » 2017-10-14, 15:05 UTC

Confirmed.
I suppose that the best solution is to display a standard message box like "Path ... is invalid" or, at worst, just to produce the system "Error" sound
And/or to go straight to the root of that drive.
Drag this tab so that it is not the last (or just open some tabs after it)
This is not necessary. If this tab is the last one (and active), it is immediately deactivated.
PS, it may be a very old bug, I confirmed it also on 8.50b15 on my Win98 virtual machine.
We are not so S.M.A.R.T. as we imagine...

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36255
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2017-10-15, 07:20 UTC

This cannot be avoided: When you try to switch to a tab which is locked, and the directory doesn't exist, TC will go to the parent of that directory. Since the tab explicitly forbids to go to a different location, TC is forced to open a new tab for that parent directory.

When you try to remove the last, not locked tab, TC would have to switch to the previous tab. But since it contains an invalid directory AND is locked, TC is forced to open a new unlocked tab.

So to get rid of these tabs, unlock and close them.
Author of Total Commander
http://www.ghisler.com

User avatar
Vochomurka
Power Member
Power Member
Posts: 769
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka » 2017-10-15, 07:25 UTC

2ghisler(Author)
Of course, it is evident.
What about some visual and/or acoustic warning to the user to let him know that his action (attempt to go to the absent path) is invalid?
Thank you

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36255
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2017-10-15, 07:29 UTC

Hmm, what do you have in mind?
Author of Total Commander
http://www.ghisler.com

User avatar
Vochomurka
Power Member
Power Member
Posts: 769
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka » 2017-10-15, 07:30 UTC

Vochomurka wrote:I suppose that the best solution is to display a standard message box like "Path ... is invalid" or, at worst, just to produce the system "Error" sound

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36255
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2017-10-16, 09:38 UTC

I will consider it for a later version. Currently it's not so easy, you would get this error message or beep on every failed directory change, which would be quite annoying.
Author of Total Commander
http://www.ghisler.com

siealex
Senior Member
Senior Member
Posts: 222
Joined: 2009-03-22, 16:36 UTC

Post by *siealex » 2017-10-16, 18:24 UTC

Since the tab explicitly forbids to go to a different location, TC is forced to open a new tab for that parent directory.
And if I have a LOCKED tab for this PARENT directory, TC goes to that tab. Is it intended?
Image: https://s1.postimg.org/6tfa0qm9an/592.jpg
We are not so S.M.A.R.T. as we imagine...

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36255
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2017-10-17, 09:01 UTC

It depends on the LockedTabChange option in wincmd.ini. The default is 1, which means re-use existing tab with that directory.
Author of Total Commander
http://www.ghisler.com

User avatar
Vochomurka
Power Member
Power Member
Posts: 769
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka » 2017-10-18, 06:25 UTC

ghisler(Author) wrote:I will consider it for a later version. Currently it's not so easy, you would get this error message or beep on every failed directory change, which would be quite annoying.
Perfect! This annoyance will force the user to study out what's happening that he can't activate some specific tab.
The situation when some tab is inaccessible is not normal and must be avoided. On the other hand, it is rather seldom. So, the user must be informed explicitly that something is wrong in his tabs. I prefer to get the message box with incorrect (in my case - absent) path, and the description of error (not TC's, but user's one)

Post Reply