+[TC8.50b4]Download from list:copy long names

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 4626
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

+[TC8.50b4]Download from list:copy long names

Post by *white »

* Unpack zip file included below to the root of drive D:

Code: Select all

MIME-Version: 1.0
Content-Type: application/octet-stream; name="Long name test.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Long name test.zip"

UEsDBBQAAgAAAOAJPkMAAAAAAAAAAAAAAAAFAAAAVGVtcC9QSwMEFAACAAgA6qM9Q9JjSIgFAAAA
AwAAAP4AAAAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5
MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2
Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIz
NDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkw
MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwLnR4dDM0MgYAUEsDBBQAAgAIAOqjPUPSY0iI
BQAAAAMAAAAFAAAAYS50eHQzNDIGAFBLAwQUAAIACAD7CD5DNoQsmD8AAAA1AwAADAAAAGNvcHls
aXN0LnR4dLNOzs/NTc0r4eVKzi+otEqxijE0MjYxNTO3sDQYaSy9kooSBV07BWAglKTmFozwkECk
iET0gEkccAcObMAAAFBLAQIUABQAAgAAAOAJPkMAAAAAAAAAAAAAAAAFAAAAAAAAAAAAEAAAAAAA
AABUZW1wL1BLAQIUABQAAgAIAOqjPUPSY0iIBQAAAAMAAAD+AAAAAAAAAAEAIAAAACMAAAAxMjM0
NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAx
MjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4
OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1
Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEy
MzQ1Njc4OTAxMjM0NTY3ODkwLnR4dFBLAQIUABQAAgAIAOqjPUPSY0iIBQAAAAMAAAAFAAAAAAAA
AAEAIAAAAEQBAABhLnR4dFBLAQIUABQAAgAIAPsIPkM2hCyYPwAAADUDAAAMAAAAAAAAAAEAIAAA
AGwBAABjb3B5bGlzdC50eHRQSwUGAAAAAAQABADMAQAA1QEAAAAA
The zip file contains an empty folder "Temp"
File with long file name "12345....txt" (254 characters)
File with short name "a.txt"
'Download list' file "copylist.txt"

* Execute the file copylist.txt using the FTP Download From List feature. Click Keep if TC warns about long name.

copylist.txt before

Code: Select all

;comment
copy:d:\1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.txt -> d:\temp\1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.txt
copy:d:\a.txt -> d:\temp\a234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.txt
copylist.txt after

Code: Select all

OK-mment
copy:d:\1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.txt -> d:\temp\1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.txt
OK-y:d:\a.txt -> d:\temp\a234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890.txt
The short file name is copied to a long name without problems (third line).
The long file name is truncated without warning and the previous line is marked with the "OK-" mark.
Doing the same file operations 'by hand' works OK.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48096
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The BTM doesn't currently handle long file names, the maximum length of a line which works correctly is 2*260-1 characters. I will increase it to 1023, which is unfortunately the maximum possible value.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 4626
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Thanks. Please alert the user before truncating a file name and never put the "OK-" mark on the wrong line.
User avatar
white
Power Member
Power Member
Posts: 4626
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Tested TC8.50b5 32 bit.

Lines up to length 1023 work OK.

Same problems as before if line is 1024 or longer. The line is truncated without warning and "OK-" mark is always placed on the first line (previously, I wrongly assumed it was placed on the previous line).

I still suggest to warn the user when a line is too long. And skip the line if it is too long. If it is not easy to detect if a line is 1024 or longer, perhaps you can allow lines up to 1022 in length and display a message when a (truncated) line is 1023 in length.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48096
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, this isn't currently planned - this would disrupt the operation of the function.
Author of Total Commander
https://www.ghisler.com
Post Reply