Quickview zip file: use "root" readme not "first" readme

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
hi5
Power Member
Power Member
Posts: 596
Joined: 2012-11-03, 11:35 UTC
Contact:

Quickview zip file: use "root" readme not "first" readme

Post by *hi5 »

I noticed that when I do a quickview on an archive it shows the readme.txt/md/file_id.diz in the panel but it uses the first it can find and not the one in the root of the archive so to speak - this makes it less useful for me (as the first readme in such cases often have something like "places files here" or "image folder" and not the description of the "thing" (program, archive) as intended when the archive was created.

Example: If you have an archive with the structure as below, it shows the contents of "testzip\folder2\readme.txt" and not the one from the root "testzip\readme.txt" when you do a Quick View.

Code: Select all

testzip.zip
 \testzip\folder1\file.txt
 \testzip\folder2\readme.txt
 \testzip\readme.txt
 \testzip\file.txt
I would prefer to be able to see the "root" version even it would mean it might become a "bit slower" (if that was the reason to use "first" vs "root"). If need be via a INI setting if the current behaviour is required to be standard.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
Usher
Power Member
Power Member
Posts: 1722
Joined: 2011-03-11, 10:11 UTC

Re: Quickview zip file: use "root" readme not "first" readme

Post by *Usher »

2hi5
There is no file in a root folder in your case. I suppose that you want to display readme from the root or topmost folder rather than the first readme listed in the archive.
Andrzej P. Wozniak
Polish subforum moderator
hi5
Power Member
Power Member
Posts: 596
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Quickview zip file: use "root" readme not "first" readme

Post by *hi5 »

Yes, top-most, this also shows "folder2\readme.txt" not "\readme.txt"

Code: Select all

testzip.zip
 \folder1\file.txt
 \folder2\readme.txt
 \readme.txt
 \file.txt
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
petermad
Power Member
Power Member
Posts: 15678
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Quickview zip file: use "root" readme not "first" readme

Post by *petermad »

Support++
License #524 (1994)
Danish Total Commander Translator
TC 11.50b8 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1385a
TC 3.60b4 on Android 6, 13 & 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
funkymonk
Senior Member
Senior Member
Posts: 485
Joined: 2013-12-04, 09:56 UTC

Re: Quickview zip file: use "root" readme not "first" readme

Post by *funkymonk »

Support++
hi5
Power Member
Power Member
Posts: 596
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Quickview zip file: use "root" readme not "first" readme

Post by *hi5 »

Bump +1
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49597
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Quickview zip file: use "root" readme not "first" readme

Post by *ghisler(Author) »

I can prioritize files in a path with less slashes than those further down. But currently there is a hierarchy of names I'm looking for:
1. file_id.diz
2. readme* without any of the following extensions: .com.exe.lnk.wav.mp.avi.bmp.gif.jp.png.tif.swf.flv.mov.wm
3. read* with the same exclusion list
4. files with extension .nfo
5. files with extension .txt
6. files with extension .doc

It would be easy to prefer a file of the same level with a shorter path, e.g. \readme.txt and \subdir\readme.txt.
But how should we handle ambiguous cases, e.g.
\read.txt and \subdir\readme.txt
\file.nfo and \subdir\readme.txt
etc.
There is also the problem of archives with no files in the root, like the original example above. This could also lead to ambiguous cases, e.g.
\project1\compile\readme.txt
\project2\documentation\html\readme.txt
Author of Total Commander
https://www.ghisler.com
hi5
Power Member
Power Member
Posts: 596
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Quickview zip file: use "root" readme not "first" readme

Post by *hi5 »

ghisler(Author) wrote: 2024-10-31, 08:34 UTCIt would be easy to prefer a file of the same level with a shorter path, e.g. \readme.txt and \subdir\readme.txt.
The shortest path to one of the valid files you look for seems logical.
ghisler(Author) wrote: 2024-10-31, 08:34 UTCThere is also the problem of archives with no files in the root, like the original example above. This could also lead to ambiguous cases, e.g.
\project1\compile\readme.txt
\project2\documentation\html\readme.txt
In those cases I would leave it as is as there is no clear "best" solution and the person packing the file hasn't taken this into account e.g. hasn't provided a file_id.diz in the "root".

So the first valid file having the shortest path, either "\file_id.diz" (clearly the best) or "folder\subfolder\readme.doc" if that is both the shortest and first?
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
hi5
Power Member
Power Member
Posts: 596
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: Quickview zip file: use "root" readme not "first" readme

Post by *hi5 »

06.11.24 Release Total Commander 11.50 beta 5
31.10.24 Added: Quick view on archive: Prefer readme files of the same priority near the root of the archive instead of the first encountered (32/64)
Thanks, works as expected for me with zip files I have here.
(I can't post the ctrl+letter combo due to "unsupported characters")
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Post Reply