Solved [Tc 8.0 & 7.56a] Different behaviour of UseTrash

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 16030
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Solved [Tc 8.0 & 7.56a] Different behaviour of UseTrash

Post by *petermad »

Settings:
VistaDelete=1
UseTrash=1

If I press F8 on a file, Windows aks if I want to move the file to the Recycle bin. This is expected behaviour.
If I press Shift+F8 on a file, TC aks if I want to delete the file and deletes it permanently. This is expected behaviour.

Settings:
VistaDelete=1
UseTrash=0

If I press F8 on a file, TC asks if I want to delete the file and deletes it permanently. This is expected behaviour.
If I press Shift+F8 on a file, Windows aks if I am sure whether I want to permanently delete the file. This is not expected behaviour - I expect the same behaviour no matter whether I use UseTrash=1 and press F8 or if I use UseTrash=0 and press Shift+F8. E.g I would expect Windows to ask if I want to move the file to the Recycle bin

---------------------------

In comparison to:

Settings:
VistaDelete=0
UseTrash=1

If I press F8 on a file TC asks if I want to delete the file and moves the file to the Recycle bin. This is expected behaviour.
If I press Shift+F8 on a file, TC aks if I want to delete the file and deletes it permanently. This is expected behaviour.

Settings:
VistaDelete=0
UseTrash=0

If I press F8 on a file, TC asks if I want to delete the file and deletes it permanently. This is expected behaviour.
If I press Shift+F8 on a file TC asks if I want to delete the file and moves the file to the Recycle bin. This is expected behaviour.


I think it is a bug that UseTrash=0 and pressing Shift+F8 doesn't lead to the same result whether or not VistaDelete is set to 0 or 1.
Last edited by petermad on 2021-05-30, 17:08 UTC, edited 3 times in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Just have a look at the detailed answer of karlchen right there
#5767 Personal license
User avatar
petermad
Power Member
Power Member
Posts: 16030
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2sqa_wizard

It was because of Karlchens answer that I looked into it.

But my report doesn't concern quite the same - it concerns the effect of the setting of UseTrash (or "Configuration" -> "Options..." -> "Copy/Delete" -> "General Copy+Delete options" -> "F8/Del deletes to recycle bin (Shift=directly)".

With VistaDelete=0 and in all previous TC versions before VistaDelete, disabeling this setting made Shift+F8 reverse the setting and delete to recycle bin anyway.

With VistaDelete=1 or Vistadelete absent in TC 8.0b7 disabeling the setting (UseTrash=0) does no longer make Shift+F8 delete to recycle bin - it results in Windows - not TC - deleting the file permanently.

My complaint is that using Shift+F8 does not result in deleting to recycle bin, when UseTrash=0 if VistaDelete=1.

Personally I don't care - I have usually disabled recycle bin on system level (only enabled it temporarily for testing this). But some people might be surprised when they use Shift+F8 (and have UseTrash=0) and then cannot find the file in the recycle bin later.

I have now edited my first post to try to make it even clearer what it is about...
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3893
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Post by *sqa_wizard »

Well, I mainly refer to the statement:
karlchen wrote:I.e with VistaDelete=1 (==new default behaviour on Vista and above), Windows is responsible for the different layouts of the confirmation dialogues, not Total Commander.
My conclusion is:
Windows takes control over deletion process!
Hence: "UseTrash=" option is not considered anymore, Windows recycle bin settings are valid now.
#5767 Personal license
User avatar
petermad
Power Member
Power Member
Posts: 16030
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I totally disagree with that.

IMHO the UseTrash setting tells whether the user wants f8/Del to delete the file or to move it to recycle bin (and reverse the choice when using the Shift modifier key). Whether or not the desired action has to be carried out by TC or by the VistaDelete method should be of no relevance to the UseTrash setting.
Windows is responsible for the different layouts of the confirmation dialogues,
This refers to the fact that of course it is Windows that shows the dialogue when it is Windows that is going to carry it out.

And as I wrote, I had set up my Windows to use the recycle bin - but still Windows will delete permanently when I press Shift+F8 and VistaDelete=1 and UseTrash=0 but moves to recycle bin when pressing F8 and UseTrash=1 - so that shows that the UseTrash setting does affect what Windows does - it just results in the wrong action from Windows when UseTrash=0.

What TC seems to do now, is passing on the shift-key status to Windows when requesting the deletion, and since Shift+Del in Explorer results in permanently deleting, this also happens in TC, despite the setting of UseTrash.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Petermad is right:
I have not taken into account and have not tested what happens if you make T.C. by pass the recycle bin when deleting, i.e UseTrash=0.

Neglecting to take this T.C. parameter into account is due to the fact that I have never understood why it should make sense to have the Windows recycle bin enabled, but tell T.C. to bypass it as a rule. As a consequence I have never changed the T.C. default: UseTrash=1.

Moreover let me make clear that only with VistaDelete=1 Windows will ask whether you wish to move object(s) to the recycle bin, not T.C., provided you tell T.C. to delete to the recycle bin.
(Default = UseTrash=1, by pressing <DEL> or <F8>)

If you tell T.C. to delete bypassing the recycle bin, irrespective of VistaDelete, it is always T.C. which asks for confirmation.
(Default = UseTrash=1, by pressing <Shift><DEL> or <Shift><F8>)

Yet I had said so in the other thread, but without paying attention to the fact that you can revert the meaning of <DEL> / <F8> and <Shift><DEL> / <Shift><F8>.

Karl
User avatar
HolgerK
Power Member
Power Member
Posts: 5409
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

It was always a mystery for me why:
UseTrash=1 Use Recycle Bin if available and enabled
did not what it said, but only inverts the meaning of the modifier <Shift> while deleting...
Wouldn't
"UseTrash=0 Do not use Recycle Bin even if available and enabled"
be a more logical interpretation?

Regards
Holger
User avatar
karlchen
Power Member
Power Member
Posts: 4605
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, HolgerK.

As far as I understand, "UseTrash" just tells T.C. what its own preferred delete behaviour should be:
  • UseTrash=1 (default) tells T.C. to try to delete to the Windows Recycle Bin. This does not switch the Windows Recycle Bin on in case it has been disabled.
    The default keys to trigger deletion are <DEL> / <F8>. They will trigger the configured T.C. delete method, which in this case is "move to recylce bin".
    On a case by case basis you can revert the current delete method to the opposite by pressing <Shift><DEL> / <Shift><F8>.
  • UseTrash=0 tells T.C. to try to delete by bypassing the Windows Recycle Bin. This does not switch the Windows Recycle Bin off in case it has is enabled.
    The default keys to trigger deletion are <DEL> / <F8>. They will trigger the configured T.C. delete method, which in this case is "delete bypassing the recycle bin".
    On a case by case basis you can revert the current delete method to the opposite by pressing <Shift><DEL> / <Shift><F8>.
So the "UseTrash" parameter name is ok. It does what it is supposed to do. It defines the preferred delete T.C. method:
  • delete to recycle bin (default) vs delete bypassing recycle bin.
  • The configured preferred method is invoked by pressing <Del> / <F8>.
  • On a case by case basis, you use the other delete method by adding the modifier key <shift>.
  • The problem really is that without checking the T.C. configuration first, you cannot know which delete method will be used by <DEL>/<F8> and which one by <Shift><Del> / <Shift><F8>.
  • It is much like a light switch where you never know whether the on/off positions have been swapped or not.
So, HolgerK, "UseTrash" means exactly what you wrote in your previous post. Yet, T.C. allows you to make exceptions from the rule. (see above)

Any potential "UseTrash" confusion exists independently of the parameter "VistaDelete".
But the interaction between "UseTrash" and "VistaDelete" is not totally unlikely to increase this confusion.
What makes things even more complicated is that the parameters "UseTrash" and "VistaDelete" have got no influence on or control over the Windows settings "Use recycle bin" and "Ask for confirmation before deleting".
But the Windows recycle bin configuration will have influence on whether
+ T.C. can delete to the recycle bin at all even if told to do so.
+ the user will be asked to confirm "delete to trash" if VistaDelete is on, but the Windows recycle bin confirmation is off.

Cheers,
Karl
User avatar
HolgerK
Power Member
Power Member
Posts: 5409
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK »

I know how "UseTrash" works.
My comment about it, was that the binary interpretation is more like:
Use the recycle.bin or use is not. (in any case!)

A name like TCsInternalDeleteBehaviorConsideringTheStateOfThe ModifierKeyShift would match the actual behavior better.

Anyway, also if i always bypass recylce bin by pressing <Shift>, i have never changed this key different from its default, because i want a consistent handling of <Del> and <Shift+Del> in any place (also inside file dialogs).
Any potential "UseTrash" confusion exists independently of the parameter "VistaDelete".
But the interaction between "UseTrash" and "VistaDelete" is not totally unlikely to increase this confusion.
There is already a dependency from another existing key:
"Win95Delete=1" (Use Explorer delete method) disables any interpretation of "UseTrash" (just to add some more confusion :wink:).

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

Post by *ghisler(Author) »

Confirmed, UseTrash=0 should use the trash with Shift+F6. I will fix it.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 16030
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Confirmed fixed in TC 8.0b8 :-)

UseTrash now does what it is expected to, also when VistaDelete=1
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50479
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply