MAXPATH for %L %F and %UL %UF

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

MAXPATH for %L %F and %UL %UF

Post by *nsp »

I use a lot filelist from TC using %L or %UL

I have a very long archive folder name (recently generated) and I found that the exported path length is limited to 260 chars for %UL or %L but not for %WL.

The exported names are truncated without any warning could it be fixed ?

This is not a new bug as i did found the same behavior in TC8.52a..
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, 259 chars is the maximum normal Windows programs can open (MAX_PATH=260, includes terminating 0 byte).
Author of Total Commander
https://www.ghisler.com
User avatar
nsp
Power Member
Power Member
Posts: 1804
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Post by *nsp »

ghisler(Author) wrote:Yes, 259 chars is the maximum normal Windows programs can open (MAX_PATH=260, includes terminating 0 byte).
I understand this limitation but this is the target pgm that have to handle it not TC !
Here we have a filelist that should not be impacted by this limitation and not produce wrong file name.

This is also in contradiction with all the following :
- %WL is producing the real filenames without limitation,
- %P%S is producing the real filenames without limitation
- %P%N is producing the real filename without limitation
Skif_off
Member
Member
Posts: 132
Joined: 2013-09-30, 13:13 UTC

Re: MAXPATH for %L %F and %UL %UF

Post by *Skif_off »

nsp wrote:This is not a new bug as i did found the same behavior in TC8.52a..
Total Commander Forum Index -> TC Behaviour which will not be changed -> [TC8.01-8.51b5] %L, %UL, %WL with long name - bug or no?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It is definitely a bug at least because filelist contains invalid truncated paths with no possibility to detect if they are truncated or not so target program can process wrong files/folders.
Safe options here are: 1) leave long paths as is, 2) filter long paths out from filelist, 3) show a warning with buttons leading to way #1 or #2.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

MVV wrote:It is definitely a bug at least because filelist contains invalid truncated paths with no possibility to detect if they are truncated or not so target program can process wrong files/folders.
Safe options here are: 1) leave long paths as is, 2) filter long paths out from filelist, 3) show a warning with buttons leading to way #1 or #2.
+100

Imo, suggestions 1 or 3 are the preferred choices. (Personally i gravitate towards 3.)

Suggestion 2 still has the potential of changing the expected result with the users being unaware of the "hidden" alteration of their intent.
Post Reply