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, 10:52 GMT
Last edited by Rafaël Carré (funman) - Saturday, 19 June 2010, 08:32 GMT
Task Type Patches
Category Playlists
Status Unconfirmed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


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:

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, 00:45 GMT
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, 08:32 GMT
Replace ';' by '|' (untested)

Will obviously break compatibility with existing bookmarks
Comment by Dominik Riebeling (bluebrother) - Saturday, 19 June 2010, 08:40 GMT
Why not use an unprintable character like \t?
Comment by Rafaël Carré (funman) - Saturday, 19 June 2010, 08:48 GMT
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, 08:26 GMT
"|" 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, 20:34 GMT
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.