FS#12996 - path_trim_whitespace() shouldn't trim the start of a filename

Attached to Project: Rockbox
Opened by Frank Gevaerts (fg) - Monday, 15 September 2014, 22:34 GMT
Last edited by Michael Sevakis (MikeS) - Wednesday, 18 October 2017, 20:06 GMT
Task Type Bugs
Category Playlists
Status Closed
Assigned To Michael Sevakis (MikeS)
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Filenames can legally start with space characters. This was supported before 7d1a47cf. The new path_trim_whitespace() trims both the start and end of filenames.
This task depends upon

Closed by  Michael Sevakis (MikeS)
Wednesday, 18 October 2017, 20:06 GMT
Reason for closing:  Out of Date
Additional comments about closing:  Function was removed anyway and old behavior restored in 5c6ccb4.
Comment by Michael Sevakis (MikeS) - Monday, 15 September 2014, 23:40 GMT
I know they can but does this even make sense. Is playlist parsing supposed to include leading whitespace? That's the only code using it for now but other stuff can be put together to support alternatives. What about quoted paths?
Comment by Michael Sevakis (MikeS) - Tuesday, 16 September 2014, 03:24 GMT
VLC does eat the whitespace at the start and end of the line while WMP only eats the trailing ones. Does "legally" refer to M3U specifically (not legal FS paths in particular)?
Comment by Frank Gevaerts (fg) - Tuesday, 16 September 2014, 08:34 GMT
path_trim_whitespace() isn't only called for m3u files. It's called for any file you try to add to the playlist, a.k.a. any file you try to play.
Comment by Michael Sevakis (MikeS) - Wednesday, 17 September 2014, 06:26 GMT
I'm considering something else that only trims, changes separators or strips drive letters for parsing a cuesheet but makes no modification to paths given from internal sources like the file browser.