Improve temporarly unavailable drive handeling to avoid loosing the current path.

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
fsteff
Junior Member
Junior Member
Posts: 3
Joined: 2021-08-10, 10:44 UTC

Improve temporarly unavailable drive handeling to avoid loosing the current path.

Post by *fsteff »

Below are suggestions to improve Total Commander's drive handling when said drives are temporarily unavailable.

The current behavior, when a drive/path is/becomes unavailable, is to either silently modify the path to c:\ or to prompt to select a new drive.
This happens during the startup of Total Commander, when switching tabs, when selecting folders from the directory menu and also selecting the drive in the drive drop-down/menu button bar. It also happens when a network drive hasn't been finally mounted by Windows.

I'm aware the Windows Explorer, Norton Commander, Midnight Commander, and many others have this implemented this way, but that does not mean that it's good behavior, just that nobody tried to change it for the better!

Most of the time the current behavior disrupts one's workflow, especially since the path for the active tab is lost for good.

For me this is usually related to network drives that have not been remounted after Windows has restarted (where the drive is visible as a button in Total Commander, but invalid to access until after it has been opened once in Windows Explorer), network drives that suddenly become unavailable over an unstable VPN, or it's related to USB drives on electronics I'm currently developing.


I hope these suggestions will be considered for a future version of Total commander:

1. Allow invalid paths in tabs.
Allow the invalid path in the tabs and keep the lister contents (if available), but render the path in red color as a visual guide that it's invalid - hereby also avoiding a popup dialog. Optionally add an option to enable this behavior, if people really want the current behavior.

2. Try harder to resolve known but unmounted (network) drives.
Allowing invalids paths would mediate this problem, but it would be really great if Total Commander would try to re-establish the connection to the drive, just a Windows Explorer is able to do.

Best regards.
User avatar
funkymonk
Senior Member
Senior Member
Posts: 408
Joined: 2013-12-04, 09:56 UTC

Re: Improve temporarly unavailable drive handeling to avoid loosing the current path.

Post by *funkymonk »

support++

I can totally refer to this suggestion and I like the two options to improve the situation (including the "warning color" in option 1).

However, for Option 1 ("Allow invalid paths in tabs") I wonder what happens if someone tries to enter a directory that is still listed when the drive is no longer available. I guess TC will not (and should not!) scan the entire device (or remote drive, etc.) just to know all the directories and files that exist. For me it would be totally fine if entering directories was just not possible for such devices, i.e., the attempt would simply be ignored.

BTW: It would also be great to accept invalid drives for tabs that are restored on TC launch. Since I do not expect TC to remember the last file list, it would also be totally fine to simply show an empty list (and the warning color) until the drive becomes available again.

BR
funkymonk
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Improve temporarly unavailable drive handeling to avoid loosing the current path.

Post by *petermad »

Maybe setting 1 of this parameter is what you need:
Help wrote: IgnoreDirErrors=0
1: allows you to switch to inaccessible or non-existent directories, shows <Read error!> in file list instead
0: only shows <Read error!> at the start of Total Commander for unreachable directories on locked tabs
-1: never shows <Read error!>, always switches away from unreachable directories
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
fsteff
Junior Member
Junior Member
Posts: 3
Joined: 2021-08-10, 10:44 UTC

Re: Improve temporarly unavailable drive handeling to avoid loosing the current path.

Post by *fsteff »

@petermad
Thanks for your input.

I tried adding the IgnoreDirErrors option and tested the options you provided, but it seems like TC ignores it completely and always behaves as if it was set to -1 - at least in my tests I were never able to make it shows <Read error!> and it always switches away from unreachable directories.

Searching the forum for more info about the IgnoreDirErrors option, I found this post (viewtopic.php?t=49858) in which @ghisler states that "This is intentional - when TC gets a WM_DEVICECHANGE notification that a currently displayed drive is gone, then TC switches away from that drive."

I hope this is something that's up for discussion.
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Improve temporarly unavailable drive handeling to avoid loosing the current path.

Post by *petermad »

2fsteff
I tried adding the IgnoreDirErrors option and tested the options you provided
Just to make sure - did you add the IgnoreDirErrors=1 to the [Configuration] section of your wincmd.ini file, and did you restart TC after editing wincmd.ini?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
fsteff
Junior Member
Junior Member
Posts: 3
Joined: 2021-08-10, 10:44 UTC

Re: Improve temporarly unavailable drive handeling to avoid loosing the current path.

Post by *fsteff »

@petermad

Yes, I did add it to the [Configuration] section. I was surprised to not find it in the file by default, so I searched the forum to find the appropriate section. I started adding it to the top of the section, but since it didn't change the behavior of TC, I also tried to move it to the bottom of the section, but still to no avail.
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Improve temporarly unavailable drive handeling to avoid loosing the current path.

Post by *petermad »

Hmm, it works for me with for example SD-card readers when the card is removed, or with Networks shares when mounted as drives, when the shared computer goes offline.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply