TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander

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

Moderators: white, Hacker, petermad, Stefan2

User avatar
yyang
Member
Member
Posts: 155
Joined: 2007-03-27, 11:41 UTC
Location: China

Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander

Post by *yyang »

@DrShark Thanks for the investigation! I don't get any error on my laptop and another desktop machine, just silent crash.
#147523
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander

Post by *DrShark »

history951.txt wrote:09.03.20 Fixed: Intercept Ctrl+V and Shift+Insert to command line and current path edit when it doesn't contain plain text, to avoid crash due to a Windows bug (32/
I can confirm on Windows 7 32-bit in TC 9.51 RC5 there is no more Access Violation error on attempt to paste with Ctrl+V or Shift+Ins into the Command line, Current directory bar, Shift+F4 dialog's and other input fields all the files copied with Ctrl+C in Everything: currently just the path of first search result item is pasted without errors. If all files are copied from Everything, the Paste item of Total Commander's input field context menu is disabled even in TC 9.51 RC4, so for this case the problem seems to be completely fixed.

2yyang
Does the paste with Ctrl+V or Shift+Ins still crashes TC 9.51 RC5 for your test cases on your Windows 10 (to rule out the fix by some Windows update, re-check the crash with TC 9.51 RC4 just before updating to RC5)?
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
yyang
Member
Member
Posts: 155
Joined: 2007-03-27, 11:41 UTC
Location: China

Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander

Post by *yyang »

I can confirm that this issue has been fixed in 9.51 RC5. The file path is safely pasted in. Thanks a lot!
#147523
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander

Post by *ghisler(Author) »

I'm reading the path myself from the CF_HDROP clipboard format, there is no need to try to access the files themselves. Then I paste it to the edit box/combobox and cancel the Windows paste.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Re: TC9.50b3: pasting a file from a privileged directory into the address bar may crash Total Commander

Post by *DrShark »

Some more info after additional testing:
1. There is a difference in path quoting when Windows is doing a paste in TC 9.51 RC4, and when TC 9.51 RC5's or newer intercept function is pasting a path copied from Everything with Ctrl+C. Christian Ghisler's explanation (from email):
Christian Ghisler wrote:Windows adds the quotes when there is no CF_TEXT or equivalent. [...] I read the first path from CF_HDROP field and paste it without further processing. No quotes are needed in the path field. It's not needed in most other fields, e.g. when using cd path in the command line, or as a target in F5, so I don't add quotes.
So this little difference is intentional.
2. In TC 9.51 RC5 or newer, it's possible to paste a path with Ctrl+V/Shift+Ins copied from Everything with Ctrl+C even on Vista - before the fix with added intercept function it didn't work there at all.
3. It's possible to paste a path copied from Everything with Ctrl+C in Shift+F6 inplace rename field now (it didn't work in TC 9.51 RC4 or older).
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply