Page 1 of 1

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

Posted: 2023-08-06, 09:20 UTC
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.

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

Posted: 2023-08-06, 15:00 UTC
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.

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

Posted: 2023-08-06, 16:17 UTC
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

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

Posted: 2023-08-06, 16:25 UTC
by petermad
Support++

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

Posted: 2023-08-06, 16:43 UTC
by funkymonk
Support++

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

Posted: 2024-10-30, 21:34 UTC
by hi5
Bump +1

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

Posted: 2024-10-31, 08:34 UTC
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

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

Posted: 2024-11-03, 19:41 UTC
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?

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

Posted: 2024-11-06, 17:22 UTC
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")