Rockbox

Tasklist

FS#1780 - File type handling in tree.c is limited and incorrect

Attached to Project: Rockbox
Opened by Magnus Holmgren (learman) - Tuesday, 04 November 2003, 11:26 GMT
Last edited by Daniel Stenberg (bagder) - Wednesday, 09 March 2005, 10:52 GMT
Task Type Bugs
Category User Interface
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

The file type handling in tree.c needs improvements.
Storing the file type as ordinary file attributes is
limited and logically wrong.

Rockbox defines 6 "normal" file attributes and 11 file
type attributes and packs that in a 16-bit word
(possible by using 2 bits for the text file). Adding a
bookmark file type will only make this problem worse.
As implemented in tree.c, this worked fine until the
.rockbox browsing feature was added. Browsing for .cfg
or .wps files will also show .txt files.

As tree.c should (and mostly does) treat a file as
being of one type only, using attributes to store the
information is logically wrong and also misleading (as
shown by the .rockbox browsing code).

I suggest that Rockbox either use the top 8 bits of the
entry.attr field (in tree.h) for a file type enum (not
neccessarily as a C enum), or, maybe better, split attr
into two bytes, attr and type. I can do the changes, if
needed.
This task depends upon

Closed by  Daniel Stenberg (bagder)
Wednesday, 09 March 2005, 10:52 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Logged In: YES
user_id=1110

This report is very old and concerns a Rockbox version from eons ago.

Lots happen in the Rockbox all the time, and if you still have
problems with this matter I suggest you file a new entry.
Comment by Björn Stenberg (zagor) - Saturday, 29 November 2003, 11:42 GMT

This (splitting into attr and type) sounds like a good change. Feel free
to submit a patch.
Comment by Daniel Stenberg (bagder) - Wednesday, 09 March 2005, 10:52 GMT

This report is very old and concerns a Rockbox version from eons ago.

Lots happen in the Rockbox all the time, and if you still have
problems with this matter I suggest you file a new entry.

Loading...