Viewing a file with forbidden characters in names inside the archive

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Viewing a file with forbidden characters in names inside the archive

Post by *Fla$her »

1. Open any non-empty zip and add 4 colons in front of the filename. You can see that the 4th colon is automatically replaced by '_'.
2. By pressing Ctrl+Q, you can see the message "Error writing ...\Temp\_tc\$q\:_name.ext!". If F3, then "File not found!" will be added.
3. After clicking OK, a header with the original name :::_name.ext will appear in the target panel, but a question mark will be displayed along with the display of the content (including in a plugin).
4. When you press 4 in the target panel, the change to wlx plugins does not occur.

I think it's right to replace all such characters in the Temp folder for a successful browse.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Viewing a file with forbidden characters in names inside the archive

Post by *ghisler(Author) »

Sorry, it's not possible to view files with such forbidden names. Just rename them first.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: Viewing a file with forbidden characters in names inside the archive

Post by *Fla$her »

What do you say about this?
Fla$her wrote: 2024-10-02, 06:46 UTC 1. ...You can see that the 4th colon is automatically replaced by '_'.

I think it's right to replace all such characters in the Temp folder for a successful browse.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Viewing a file with forbidden characters in names inside the archive

Post by *ghisler(Author) »

Well, TC handles the case where a path contains a colon from a drive. That's usually one colon. It cannot currently handle arbitrary invalid names, sorry.
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: Viewing a file with forbidden characters in names inside the archive

Post by *Fla$her »

ghisler(Author) wrote: 2024-10-03, 07:13 UTC Well, TC handles the case where a path contains a colon from a drive. That's usually one colon.
And which packers add a letter with a colon? TC itself, with the first option marked, doesn't do this for a list with different drive letters.
ghisler(Author) wrote: 2024-10-03, 07:13 UTCIt cannot currently handle arbitrary invalid names, sorry.
If I was only interested in the current moment, then I would not have applied to this section. Therefore, I suggest improving the behavior and processing such characters fully not at the stage of renaming in the archive, but at the stage of unpacking to the Temp folder, given that such characters can get there from another file system.

You can check the name with the RegExp: ^[A-z]:\\. If it does, then process it as it is now, if not, then replace it with '_' or delete.
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Viewing a file with forbidden characters in names inside the archive

Post by *ghisler(Author) »

And which packers add a letter with a colon?
For example, 7zip with parameter -spf or WinRAR with parameter -ep3 .
Author of Total Commander
https://www.ghisler.com
Fla$her
Power Member
Power Member
Posts: 3015
Joined: 2020-01-18, 04:03 UTC

Re: Viewing a file with forbidden characters in names inside the archive

Post by *Fla$her »

It's clear. Will you be able to debug it with RegExp?
Overquoting is evil! 👎
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50824
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Viewing a file with forbidden characters in names inside the archive

Post by *ghisler(Author) »

No, sorry, I don't plan to find all possible invalid characters.

Moderator message from: ghisler(Author) » 2024-10-15, 10:06 UTC

Moved to will not be changed
Author of Total Commander
https://www.ghisler.com
Post Reply