TC can't handle descript.ion files with lines that end in LF

Please report only one bug per message!

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Gooberslot
Junior Member
Junior Member
Posts: 22
Joined: 2003-09-20, 04:30 UTC

TC can't handle descript.ion files with lines that end in LF

Post by *Gooberslot »

Total Commander can't properly handle descript.ion files that have Unix line endings of only a line feed. When copying files with a descript.ion file formatted like that it only appears to copy every other file's comment. When I changed the line endings to CRLF the file comments were copied correctly.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6683
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

We are on Windows and so are the line endings of text files
Gooberslot
Junior Member
Junior Member
Posts: 22
Joined: 2003-09-20, 04:30 UTC

Post by *Gooberslot »

The only specification for the descript.ion format I could find said that an application should be able to handle any line endings. I have no idea which application created these descript.ion files (it clearly wasn't TC) but TC should be able to properly handle them.
Gooberslot
Junior Member
Junior Member
Posts: 22
Joined: 2003-09-20, 04:30 UTC

TC can't handle descript.ion files with lines that end in LF

Post by *Gooberslot »

I originally posted this in the wrong forum so now I'm posting it here, in the correct forum. Sorry for my mistake.

Total Commander can't properly handle descript.ion files that have Unix line endings of only a line feed. When copying files with a descript.ion file formatted like that it only appears to copy every other file's comment. When I changed the line endings to CRLF the file comments were copied correctly.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The official specs are here:
http://jpsoft.com/ascii/descfile.txt

The specs require <CR>>LF> line endings:
Each line is in the following format:

filename.ext Description[*<ID>Other program info]...<CR><LF>
I will check how difficult it would be to support Linux or Mac line breaks.
Author of Total Commander
https://www.ghisler.com
Gooberslot
Junior Member
Junior Member
Posts: 22
Joined: 2003-09-20, 04:30 UTC

Post by *Gooberslot »

From the specs you posted:

"Your program should be able to handle a line terminated by a
CR or LF alone, a CR/LF pair, an EOF (ASCII 26), or the physical end of
the file."

It sounds like even though the specs call for a CRLF ending your program should be able to gracefully handle other line endings.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 49100
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I checked it - it was indeed a bug: TC can read one comment from such a file, but then reading of comments further down in the file will fail.
Author of Total Commander
https://www.ghisler.com
Post Reply