Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11388 - Bookmark file doesn't work for a directory with a semicolon in its name

Attached to Project: Rockbox
Opened by Aaron Wells (agwells) - Wednesday, 09 June 2010, 12:52 GMT+2
Last edited by Rafaël Carré (funman) - Saturday, 19 June 2010, 10:32 GMT+2
Task Type Patches
Category Playlists
Status Unconfirmed
Assigned To No-one
Player Type Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Private No

Details

Steps to reproduce:

1. Create a directory: /AUDIO;BOOKS
2. Place a file in it: /AUDIO;BOOKS/file.mp3
3. Start playing the file, and then create a bookmark
4. Do "List bookmarks" for the file
5. The bookmark menu lists something like this:

BOOKS/;file
0:02, 2, Shuffle

The problem seems to be that .bmark files use semicolons to separate the fields of information. If there's a semicolon in the path, it thinks that it indicates the end of the path and the beginning of the filename.
This task depends upon

Comment by Rafaël Carré (funman) - Saturday, 19 June 2010, 02:45 GMT+2
We need to replace ';' by another character forbidden in FAT32, but that would break compatibility with older bookmarks

(some?) Forbidden characters: / \ * " ? : | < >
Comment by Rafaël Carré (funman) - Saturday, 19 June 2010, 10:32 GMT+2
Replace ';' by '|' (untested)

Will obviously break compatibility with existing bookmarks
   bookmark.diff (2 KiB)
 b/apps/bookmark.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

Comment by Dominik Riebeling (bluebrother) - Saturday, 19 June 2010, 10:40 GMT+2
Why not use an unprintable character like \t?
Comment by Rafaël Carré (funman) - Saturday, 19 June 2010, 10:48 GMT+2
i believe '|' is more readable but that should work too provided \t is forbidden on FAT32

looks like it is, i can create this filename on ext3 but not on fat32 from linux
Comment by Magnus Holmgren (learman) - Sunday, 20 June 2010, 10:26 GMT+2
"|" is invalid (it is checked for in fat.c, search for the invalid_chars array). To keep old bookmarks working, one could check if the bookmark contains any "|", and if so use the new separator, otherwise use the old. Hm, I think I tried that once; don't remember why I didn't commit it though...
Comment by Rafaël Carré (funman) - Friday, 09 July 2010, 22:34 GMT+2
IMO it's simpler to break bookmarks, we can add a note about it in the release notes.

Note that we also broke themes since last release.

Loading...