[TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

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

Moderators: white, Hacker, petermad, Stefan2

User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *white »

  • Execute "cd c:\path\file.docx" on TC's command line -> cursor is put on the file.
  • Execute "cd c:\path\file.docx" via a button -> file is opened as an archive.
Like the other fixes, it should only treat the file as archive if ENTER would also open it as an archive.
HISTORY.TXT wrote: 29.10.14 Fixed: cd c:\path\file.docx opened the office XML file as an archive. Same when entering path in "current directory" field. Note: NOT changed: paths received via command line parameters (32/64)
29.10.14 Fixed: Ctrl+Arrow on LNK pointing to office XML (e.g. DOCX) opened the office file as an archive (32/64)
04.03.14 Fixed: Ctrl+Left/Right arrow on archive: Only show as archive in other panel if ENTER would also open it as an archive (e.g. for .zip, but not for .docx) (32/64)

23.01.13 Added: Search function: New option "Office xml (docx, xlsx, odt etc) searches the new xml-based zipped office files, even inside other archives (32/64)
The behavior for Enter was made configurable later:
HISTORY.TXT wrote: 21.10.22 Added: PreferOpenTypes: All file types after the pipe symbol | will be opened internally as an archive, even if there is an extension, e.g. PreferOpenTypes=+|*.docx (32/64)
Shouldn't that also change the behavior of Ctrl+Left/Right and the cd command?
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *petermad »

Like the other fixes, it should only treat the file as archive if ENTER would also open it as an archive.
I agree.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *petermad »

history.txt wrote:11.09.23 Fixed: Button bar: cd path\office_document now behaves the same as in command line (takes CtrlArrowOpenArchive into account), usually places cursor on file instead of opening it as an archive. Append backslash to open as archive (32/64)
Confirmed fixed in TC 11.02rc1 :-)
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *white »

history.txt wrote:11.09.23 Fixed: Button bar: cd path\office_document now behaves the same as in command line (takes CtrlArrowOpenArchive into account), usually places cursor on file instead of opening it as an archive. Append backslash to open as archive (32/64)
It doesn't seem to work correctly with these options:

Code: Select all

PreferOpenTypes=+|*.docx
CtrlArrowOpenArchive=1
"cd c:\path\file.docx" doesn't open the file as archive and neither does Ctrl+arrow. Ctrl+arrow does nothing.

Code: Select all

PreferOpenTypes=+|*.docx
CtrlArrowOpenArchive=5
"cd c:\path\file.docx" doesn't open the file as archive and neither does Ctrl+arrow. Ctrl+arrow put the cursor on the file.



"Append backslash to open as archive" works as a button command, but doesn't work on the command line.
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *petermad »

2white
You are right - it works as expected with CtrlArrowOpenArchive=0 or 2 or 3 or 4 - but not with 1 and 5

And it also works as expected with PreferOpenTypes=+*.docx or PreferOpenTypes=*.docx or PreferOpenTypes=+ and CtrlArrowOpenArchive=0 or 2 or 3 or 4.

But there is a change TC 11.01 did not respect CtrlArrowOpenArchive=0 or 4 - but did always open *.docx files as archives when using cd or CtrlArrow.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *ghisler(Author) »

PreferOpenTypes is not used when you press Ctrl+Left/Right arrow. It is only used when you press Enter on a file.
CtrlArrowOpenArchive ignores PreferOpenTypes in all 3 functions where it is used:
1. When you press Ctrl+Left/Right arrow (was this way also in older versions)
2. When using the command line to send cd c:\path\filename (was this way also in older versions)
3. When using the button bar to send cd c:\path\filename (was changed in TC 11.02 RC1)

Therefore history.txt is correct.

It's debatable whether CtrlArrowOpenArchive should handle PreferOpenTypes or not.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *white »

ghisler(Author) wrote: 2023-10-06, 08:18 UTC It's debatable whether CtrlArrowOpenArchive should handle PreferOpenTypes or not.
Is it? Please share your arguments why CtrlArrowOpenArchive should not handle PreferOpenTypes.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *ghisler(Author) »

- because it was not taken into account in any previous version
- because Ctrl+Arrow is not the same as Enter, it never launches anything
- because users may be used to the current setting and dislike the change - there is always backlash to ANY change
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *white »

ghisler(Author) wrote: 2023-10-08, 08:35 UTC - because Ctrl+Arrow is not the same as Enter, it never launches anything
The connection is made by CtrlArrowOpenArchive value 1 ("if ENTER would open the archive as a folder"). Clearly an Office xml file is treated as an archive because CtrlArrowOpenArchive value 3 does work. So CtrlArrowOpenArchive with value 1 should also work in this case.
ghisler(Author) wrote: 2023-10-08, 08:35 UTC - because it was not taken into account in any previous version
Just because something existed in the previous version doesn't mean it should stay the same.
ghisler(Author) wrote: 2023-10-08, 08:35 UTC - because users may be used to the current setting and dislike the change - there is always backlash to ANY change
People may also dislike it when it isn't changed, the question is which group is likely to be bigger.

Suppose you used PreferOpenTypes to set up TC to open an Office xml file as an archive when pressing Enter or double-clicking the file. Which group is likely to be bigger? The group that thinks Ctrl+arrow should also open the archive unless CtrlArrowOpenArchive has value 0, or the group that thinks Ctrl+arrow should only open the document as archive when CtrlArrowOpenArchive has a vale of 3 (or combination with 3) and ignore CtrlArrowOpenArchive if it has value 1 (or combination with 1)?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *ghisler(Author) »

Maybe I should add more values to CtrlArrowOpenArchive?
For example
8 (added): Take PreferOpenTypes into account.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14809
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *petermad »

8 (added): Take PreferOpenTypes into account.

Good idea.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *white »

ghisler(Author) wrote: 2023-10-09, 10:23 UTC Maybe I should add more values to CtrlArrowOpenArchive?
For example
8 (added): Take PreferOpenTypes into account.
Seems like a possibility.

I must admit that I didn't understand the option PreferOpenTypes very well from reading the help text. The help text is:
[Ini File Settings part 2: Configuration N-Z] wrote:
PreferOpenTypes=+

File types for which a double click should prefer opening them via Explorer instead of as archives. By default, the most common Office xml file types like *.docx will be used.
Start the line with "+" to add more types, e.g. PreferOpenTypes=+*.ext1 *.ext2
or leave out the "+" to just the given types, e.g. PreferOpenTypes=*.docx *.xlsx
or add types behind pipe symbol | which should in any case be opened as archives, e.g. PreferOpenTypes=*.docx *.xlsx | *.pptx to open pptx files as archives.
Perhaps the following text can be used instead, if it is accurate:
PreferOpenTypes=+

This option applies to non-.zip files recognized as ZIP archives by Total Commander. When there is no default program set in Windows for opening them, double-clicking these files will open them as an archive. However, if a file type has an "open with" list in Windows and belongs to the common Office XML file types *.docx *.docm *.dotx *.dotm *.xlsx *.xlsm *.xltx *.xltm *.pptx *.pptm *.ppsx *.potx *.potm *.vsdx *.odt *.ods *.odp *.odg, then Total Commander will open the file via Explorer instead.
The PreferOpenTypes option allows you to customize this list of file types. You can start the line with "+" to add more types, e.g. PreferOpenTypes=+*.ext1 *.ext2. Leaving out the "+" will only consider the given types, e.g. PreferOpenTypes=*.docx *.xlsx.
You can also use the pipe symbol "|" to specify file types that should always be opened as archives, regardless of any file associations. For example, PreferOpenTypes=*.docx *.xlsx | *.pptx will open pptx files as archives.
And I was wondering if the following line in the HISTORY.TXT file is wrong:
HISTORY.TXT wrote: 21.10.22 Added: PreferOpenTypes: All file types after the pipe symbol | will be opened internally as an archive, even if there is an extension, e.g. PreferOpenTypes=+|*.docx (32/64)
Was the word "extension" used by mistake instead of the word "association"?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *ghisler(Author) »

Yes, it should be association.
The problem is that Microsoft is constantly f*cking up file associations for their office formats. The latest "feature" is that there is no definitively assigned program to open docx files (e.g. no UserChoice field), so one would assume that double clicking the file would open in an "open with" dialog. but instead, the file is opened directly in Word. Previously, TC was opening archives without an association internally as folders, also docx files because they are just renamed zip files. But that can't be done any more with the file association mess, so I had to add this PreferOpenTypes option.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *white »

ghisler(Author) wrote: 2023-10-10, 08:50 UTC Yes, it should be association.
OK, I've create a bug report for that.
ghisler(Author) wrote: 2023-10-10, 08:50 UTC ...
TC was opening archives without an association internally as folders, also docx files because they are just renamed zip files. But that can't be done any more with the file association mess, so I had to add this PreferOpenTypes option.
Thanks for explaining.
Is my suggested help text an improvement? Are you going to use that?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 11.01] cd c:\path\file.docx when used in a button etc. opens it as an archive

Post by *ghisler(Author) »

Sorry, it's too long. I already had to split the help topic into two (Configuration A..M and N..Z), and I don't want to get into that situation again very soon.
Author of Total Commander
https://www.ghisler.com
Post Reply