"Search archives" inconsistency

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

"Search archives" inconsistency

Post by *XPEHOPE3KA »

I would consider this a bug but I tested 9.51, 10 and 10.5 versions and they behaved the same so maybe I just don't understand something (or a plugin/setting is involved), but...

TLDR: "Search archives" tick when enabled forces "Find text" tick to only search archives, not "in addition to usual files"
  1. In an empty folder create file "1.txt" with a single string "ssl"
  2. Archive that file to "1.zip"
  3. Open search inside that directory, search for "1.txt", set "Search archives"
  4. Search finds both files (inside and outside the archive)
  5. Enable "Find text", input "ssl" w/o quotes, choose ANSI encoding
  6. Search finds just the archived file, not the usual one
Note that Russian translation translates "Search archives" as "Also search archives" so I think it's meant to always behave as in 4), not in 6). Neither help files seem to specify exceptions for "Find text". Is it possible to fix this so that one can search for text simultaneously inside and outside archives?
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: "Search archives" inconsistency

Post by *petermad »

2XPEHOPE3KA
I cannot reproduce the described - here TC finds both files after performing step 5.

This is how it looks like here with a fresh ini file: https://madsenworld.dk/tcmd/searchtextinarchives.png
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: 4618
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: "Search archives" inconsistency

Post by *white »

Also not confirmed.
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Re: "Search archives" inconsistency

Post by *XPEHOPE3KA »

2petermad
If I enable Everything like in your screenshot, behavior is as expected. Can you please test like this:
  1. Disable Everything
  2. Close search dialog (to force removing of cached search results)
  3. Perform 3) and 5) from original post
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: "Search archives" inconsistency

Post by *petermad »

2XPEHOPE3KA
I still get the same result - see: https://madsenworld.dk/tcmd/searchtextinarchives2.png

Could you please run this from TC's command line:

Code: Select all

"%COMMANDER_EXE%" /i=%TEMP%\test.ini
and test again.
Last edited by petermad on 2022-07-11, 14:07 UTC, edited 1 time in total.
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
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Re: "Search archives" inconsistency

Post by *XPEHOPE3KA »

2petermad
Indeed with clean config everything is Ok. (Although I needed quotes around %COMMANDER_EXE%)

The culprit appeared to be WordArc plugin set up to "txt":

Code: Select all

[PackerPlugins]
txt=400,%APPDATA%\GHISLER\Plugins\WCX\wordarc\wordarc.wcx
[PackerPlugins64]
exts=txt*
If either one of the settings above is missing, txt files are not considered archives for the purpose of searching.

I now think it's a bug in WordArc as its default settings indicate it can search within archives but in this case it doesn't (if one changes search file name to nothing, WordArc should return results from e.g. "1.txt\word_lines.txt" file).
However I'd also like to see it documented in help that enabling "Search archives" stops considering files for plain text search if they are archives according to some WCX.

P.S.: Also I can't reproduce Everything setting influence any longer :shock:
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: "Search archives" inconsistency

Post by *petermad »

2XPEHOPE3KA
Well txt=400,... means that the flag for "Allows searching for text in archives" is set, to make TC aware that the WordArc pluging should be able to search in txt files - but apparantly it is not able to.
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: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: "Search archives" inconsistency

Post by *ghisler(Author) »

When "search archives" is enabled, then Total Commander will
- search for text in files not recognized as archives
- search for text inside the packed files contained in archives

However, it will not search in the archive files themselves. For example, if a zip file contains a file named
file_name.txt
with content
file_content

Then a search for
Content: file_name
will find the zip when search in archives is unchecked, but not when search in archives is checked.
Author of Total Commander
https://www.ghisler.com
mmm
Member
Member
Posts: 120
Joined: 2020-08-10, 12:32 UTC

Re: "Search archives" inconsistency

Post by *mmm »

Oh my goodness.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: "Search archives" inconsistency

Post by *ghisler(Author) »

Sorry, I do not understand your comment.
Author of Total Commander
https://www.ghisler.com
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6481
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: "Search archives" inconsistency

Post by *Horst.Epp »

Christian,
I guess mmm has the same problem as I have with your description.
I just can't understand
"will find the zip when search in archives is unchecked, but not when search in archives is checked"
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
XPEHOPE3KA
Power Member
Power Member
Posts: 854
Joined: 2006-03-03, 18:23 UTC
Location: Saint-Petersburg, Russia

Re: "Search archives" inconsistency

Post by *XPEHOPE3KA »

2Horst.Epp
zip files with unencrypted filenames contain them as is. So to find a zip file containing file "file_name" one can search with "Find text" "file_name" but only when "Search archives" is unchecked - that is one can consider zip files as text files for this.
F6, Enter, Tab, F6, Enter, Tab, F6, Enter, Tab... - I like to move IT, move IT!..
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6481
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: "Search archives" inconsistency

Post by *Horst.Epp »

XPEHOPE3KA wrote: 2022-07-11, 16:28 UTC 2Horst.Epp
zip files with unencrypted filenames contain them as is. So to find a zip file containing file "file_name" one can search with "Find text" "file_name" but only when "Search archives" is unchecked - that is one can consider zip files as text files for this.
Ok, understand now.
But I think the following part of Christians explanation is unnecessary
"with content
file_content"
Windows 11 Home x64 Version 23H2 (OS Build 22631.3447)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: "Search archives" inconsistency

Post by *petermad »

2Horst.Epp
But I think the following part of Christians explanation is unnecessary
"with content
file_content"
That part confused me too at first - since it is not used in the later explained search.
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: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: "Search archives" inconsistency

Post by *ghisler(Author) »

The point is that when you check "Search archives", then archives are treated like directories. The search text isn't found in the archives themselves, but only in what's inside.
Author of Total Commander
https://www.ghisler.com
Post Reply