Wrong directory argument for Directory\shell command

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Andreas Leuner
Junior Member
Junior Member
Posts: 4
Joined: 2012-02-24, 13:25 UTC

Wrong directory argument for Directory\shell command

Post by *Andreas Leuner »

I have been a regular user of total commander for a few years. I also use msysgit and its "Git Bash here" windows explorer shell extension.
Since (I think) updating Total Commander to version 7.56 I started to notice the following:

Total Commander (On Windows 7) sometimes passes the wrong directory if I open a context menu with shift+menu key and then "open command window here". Well I originally noticed "Git Bash here" misbehaving, but reproduced the problem with default Windows 7 functionality.

If the wrong directory is opened in the shell it is that of the opposite panel.
This seems to happen if that other panel had the most recent directory change - or after startup - that other panel is the right-side panel.
If I use the right mouse button instead of menu key to open the context menu the problem does not occur.

If I invoke the properties entry from the context menu - problem does not occur either, i. e. the properties of the correct directory are always shown.
The problem does occur if I use another Directory\shell command like "Git Bash here". This gets the directory argument passed in the same way as "open command window here" - but just in case...
From a windows explorer window - either with rmb or menu key - no problems.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It sounds like that shell extension doesn't use the parameters passed to it (item-idlist), but uses the current directory at the time of launch. This may also be the other panel, depending on what the use did before in Total Commander.
Author of Total Commander
https://www.ghisler.com
Andreas Leuner
Junior Member
Junior Member
Posts: 4
Joined: 2012-02-24, 13:25 UTC

Post by *Andreas Leuner »

Would it be feasible to make Total Commander change its current directory upon switching panels?

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

Post by *ghisler(Author) »

I will check whether it could be added to TC8, but it needs extensive testing to avoid any negative side effects.
Author of Total Commander
https://www.ghisler.com
Andreas Leuner
Junior Member
Junior Member
Posts: 4
Joined: 2012-02-24, 13:25 UTC

Post by *Andreas Leuner »

I have now updated Total Commander to version 7.57 to see if there are any differences - same behaviour.

I also rechecked my Directory\shell registry hacks and found that I had broken the "open command window here" key.
I reverted those changes and could no longer reproduce my problem afterwards.

Sorry for the noise.

The Git bash behaviour may well be because bash does not understand a windows path argument at all. msys normally converts paths like this C:\Users -> /c/Users but that does not work for arbitrary strings that are provided "from the outside".

So changing the current directory upon panel switch isn't needed for correctly supporting default windows functionality but would certainly be nice to have.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Any news? I would like to release TC 7.57a this week, but it's difficult without any feedback at all...
Author of Total Commander
https://www.ghisler.com
Andreas Leuner
Junior Member
Junior Member
Posts: 4
Joined: 2012-02-24, 13:25 UTC

Post by *Andreas Leuner »

Ahem, maybe you meant to post in another thread? Because you wrote that any changes could be for TC8 at the earliest?

(And since I gave further info that probably clarifies this problem as my problem :wink: )
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, this was meant for the thread "Directory count not working on space bar".

As I understand it, you could resolve your problem yourself.
Author of Total Commander
https://www.ghisler.com
Post Reply