Switching to C: after returning the drive and canceling the selection of another one

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

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

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *ghisler(Author) »

Do you have the line
devicechange=0
in your wincmd.ini? Because with devicechange=1 (the default) when I disable an USB drive which Total Commander is currently showing, Total Commander switches to the tab root automatically before you can switch to it.

With devicechange=0, the switch only occurs when you activate TC - this causes a regular refresh, not a reaction to a missing drive, and results in what you describe.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *Fla$her »

2ghisler(Author)
You asked about the No button. I pointed out in which case it appears — when trying to close a locked tab. The specified key doesn't affect this in any way.

But you're right about the key value. 0 returns to the root of the locked tab. But I don't see any point in making such a tab behave differently for both values, because the path in it can be related to an existing drive (including the system one) that hasn't been disabled before or since. In other words, even in the current situation, there is still inconsistency.

As for the unlocked tab, DeviceChange=1 doesn't have a positive effect on the cancellation of the drive change, we still see the C: root, i.e. the declared response to wm_devicechange doesn't occur. At the same time, with this value, frequent notifications of third-party programs, which are picked up by TC itself, remain a problem.

To summarize, it's required:
  1. When trying to close a locked tab: don't change the current path and don't switch to the previous tab if [Cancel], [No], [✕] or Esc is pressed.
  2. When dialog selecting another drive: don't change the current path if the drive is available again and [Cancel], [✕] or Esc is pressed.
The meaning of any cancellation should be fully embedded in its logic, and not perplex/confuse/annoy the user with unusual behavior.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *ghisler(Author) »

With DeviceChange=0, TC isn't informed when the drive goes away, so it doesn't do the special processing it does when receiving the "drive removed" notification.
As for the unlocked tab, DeviceChange=1 doesn't have a positive effect on the cancellation of the drive change, we still see the C: root
That's correct for IgnoreDirErrors=0, where else should it go? With IgnoreDirErrors=1, it just shows an error.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *Fla$her »

ghisler(Author) wrote: 2024-02-14, 13:51 UTC where else should it go?
Given the tracking of the drive connection, to the same folder as before the stop, of course.
ghisler(Author) wrote: 2024-02-14, 13:51 UTC With IgnoreDirErrors=1, it just shows an error.
And why does the error occur at DeviceChange=1 at all? It's illogical.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *ghisler(Author) »

Given the tracking of the drive connection, to the same folder as before the stop, of course.
What do you mean? Trying to pick a directory from the history? What if the user was just wandering around on the removed drive?
And why does the error occur at DeviceChange=1 at all? It's illogical.
I'm not getting reverted to C:\ with DeviceChange=1, at least not with a fresh ini file.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *Fla$her »

ghisler(Author) wrote: 2024-02-15, 08:05 UTC What do you mean? Trying to pick a directory from the history? What if the user was just wandering around on the removed drive?
Sorry, with DeviceChange=1, the modal dialog will not appear on the unlocked tab. Then you can leave it as it is.
The only thing unclear is why C: is opening even if TC window is hidden.
I'm not getting reverted to C:\ with DeviceChange=1, at least not with a fresh ini file.
With IgnoreDirErrors=0 too? :shock:
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *ghisler(Author) »

With IgnoreDirErrors=0 too?
Why do you think this? I have acknowledged that it reverts to c:\ with IgnoreDirErrors=0, but there is no easy way to fix this. It would make the beta test a few weeks longer, so I will try addressing it in a later version. The beta test has dragged on for far too long for a minor update.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *Fla$her »

Why do you think this?
Because you wrote "fresh ini", which implies IgnoreDirErrors=0 by default.
It would make the beta test a few weeks longer, so I will try addressing it in a later version.
Why in a later version and not the next one (11.04 or ...)?

And what about properly canceling the closure of locked tabs? Will this fix create problems now? Or should I create a separate topic in the bugs section?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *ghisler(Author) »

Sorry for the confusion. Here it reverts to C: with IgnoreDirErrors=0 and DeviceChange=0.
It reverts to the locked tab with IgnoreDirErrors=0 and DeviceChange=1 (the default with a fresh ini).
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 2318
Joined: 2020-01-18, 04:03 UTC

Re: Switching to C: after returning the drive and canceling the selection of another one

Post by *Fla$her »

OK. I have already checked this before. Please answer the questions.
Overquoting is evil! 👎
Post Reply