Switching to C: after returning the drive and canceling the selection of another one
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50386
- 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
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.
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
https://www.ghisler.com
Re: Switching to C: after returning the drive and canceling the selection of another one
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:
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:
- 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.
- When dialog selecting another drive: don't change the current path if the drive is available again and [Cancel], [✕] or Esc is pressed.
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50386
- 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
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.
That's correct for IgnoreDirErrors=0, where else should it go? With IgnoreDirErrors=1, it just shows an error.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
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Switching to C: after returning the drive and canceling the selection of another one
Given the tracking of the drive connection, to the same folder as before the stop, of course.
And why does the error occur at DeviceChange=1 at all? It's illogical.
Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50386
- 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
What do you mean? Trying to pick a directory from the history? What if the user was just wandering around on the removed drive?Given the tracking of the drive connection, to the same folder as before the stop, of course.
I'm not getting reverted to C:\ with DeviceChange=1, at least not with a fresh ini file.And why does the error occur at DeviceChange=1 at all? It's illogical.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Switching to C: after returning the drive and canceling the selection of another one
Sorry, with DeviceChange=1, the modal dialog will not appear on the unlocked tab. Then you can leave it as it is.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?
The only thing unclear is why C: is opening even if TC window is hidden.
With IgnoreDirErrors=0 too?I'm not getting reverted to C:\ with DeviceChange=1, at least not with a fresh ini file.

Overquoting is evil! 👎
- ghisler(Author)
- Site Admin
- Posts: 50386
- 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
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.With IgnoreDirErrors=0 too?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Switching to C: after returning the drive and canceling the selection of another one
Because you wrote "fresh ini", which implies IgnoreDirErrors=0 by default.Why do you think this?
Why in a later version and not the next one (11.04 or ...)?It would make the beta test a few weeks longer, so I will try addressing it in a later version.
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! 👎
- ghisler(Author)
- Site Admin
- Posts: 50386
- 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
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).
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
https://www.ghisler.com
Re: Switching to C: after returning the drive and canceling the selection of another one
OK. I have already checked this before. Please answer the questions.
Overquoting is evil! 👎