Very long filenames are truncated ContentGetValue
Moderators: Hacker, petermad, Stefan2, white
Very long filenames are truncated ContentGetValue
If full path+filename length exceeds 260 chars FileName parameter in ContentGetValue function recieves truncated filename.
It is interesting to note - for different fields full name is truncated to different length(258 or 259)???
Obviously, in this case plugin returns incorrect value.
I think plugins should never be called with truncated filenames. If it is impossible to pass whole filename exceeding MAX_PATH, it will be more safly if TC itself will treat such cases like ft_fileerror.
It is interesting to note - for different fields full name is truncated to different length(258 or 259)???
Obviously, in this case plugin returns incorrect value.
I think plugins should never be called with truncated filenames. If it is impossible to pass whole filename exceeding MAX_PATH, it will be more safly if TC itself will treat such cases like ft_fileerror.
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
TC 7.5 will support longer names (max 1k), but not names of unlimited length, sorry.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Increasing filename length would be nice, but it wasn't my point. There always will some limit, it is Ok. I spoke about problem when filename exceeds this limit (as it may be).
Currently, when filename is too long you call plugins with truncated and therefore wrong filename.
If file with truncated name doesn't exists it is a small problem, but when such file exists, plugin returns incorrect result.
Currently, when filename is too long you call plugins with truncated and therefore wrong filename.
If file with truncated name doesn't exists it is a small problem, but when such file exists, plugin returns incorrect result.
-
- Junior Member
- Posts: 14
- Joined: 2006-11-30, 12:35 UTC
bump 
sorry for resurrecting, but today i hit the wall with this one.
i moved some files with very long names (classical music notation, its composer blah blah sonata blah blah key..... VERY long).
files resided in root of drive, and after moving them to the sub/sub/directory with pretty long name itself, majority of file names were truncated beyond recognition. it's VERY huge directory, and i'm horrified by prospect of manually fixing them myself
so, please, if it's possible, implement some kind of warning that would prevent dumb people like me doing the same thing. loosing information just by moving files around is a an awful windows quirk that should be somehow dampened in quality software like tc.
thanks in advance.

sorry for resurrecting, but today i hit the wall with this one.
i moved some files with very long names (classical music notation, its composer blah blah sonata blah blah key..... VERY long).
files resided in root of drive, and after moving them to the sub/sub/directory with pretty long name itself, majority of file names were truncated beyond recognition. it's VERY huge directory, and i'm horrified by prospect of manually fixing them myself

so, please, if it's possible, implement some kind of warning that would prevent dumb people like me doing the same thing. loosing information just by moving files around is a an awful windows quirk that should be somehow dampened in quality software like tc.
thanks in advance.
2Total Cummander
Generally I agree here, a warning would be nice (if it doesn't cost too much CPU time for checking).
But:
Generally I agree here, a warning would be nice (if it doesn't cost too much CPU time for checking).
But:
Do you think, you will exceed this limit, too?ghisler(Author) wrote:TC 7.5 will support longer names (max 1k)
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
-
- Junior Member
- Posts: 14
- Joined: 2006-11-30, 12:35 UTC

nah, i don't think i would exceed THAT limit

but i'm not sure what kind of implementation that would be, afaik limit that i hit is limit of ntfs file system at 255 bytes, if there will be something to bypass that in 7.5 then great.
i wouldn't bet on it tho, so all i can do is beg for a warning dialog

2Total Cummander
and already discussed here: http://ghisler.ch/board/viewtopic.php?t=13600
BTW, you're probably right regarding the NTFS limit; found in http://en.wikipedia.org/wiki/NTFS :
Ah, I see. This is different to the case of the first posting in this thread,afaik limit that i hit is limit of ntfs file system at 255 bytes
and already discussed here: http://ghisler.ch/board/viewtopic.php?t=13600
BTW, you're probably right regarding the NTFS limit; found in http://en.wikipedia.org/wiki/NTFS :
An absolute path may be up to 32767 characters long; a relative path is limited to 255 characters.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
-- TC starter menu: Fast yet descriptive command access!
-
- Junior Member
- Posts: 14
- Joined: 2006-11-30, 12:35 UTC