mocp -Q %file fails to execute

Forums:

mocp -Q %file fails to execute if filename contains '%' symbol.
In my case it was "%2f" being used instead of '/'.

This patch should get you going again in respect of '%', but it may cause unexpected results in the display of audio file titles in the client if the FormatString configuration option contains invalid expandos:

diff --git a/playlist.c b/playlist.c index c8bde34..910303e 100644 --- a/playlist.c +++ b/playlist.c @@ -452,7 +452,10 @@ static char *title_expn_subs(char fmt, const struct file_tags *tags) case 't': return if_not_empty (tags->title); default: - fatal ("Error parsing format string!"); + track[0] = '%'; + track[1] = fmt; + track[2] = 0; + return track; } return NULL;

If you're expecting '%2f' to be rendered as a '/', then it will not fix that.

If you're expecting '%2f' to be rendered as a '/'

No, it wasn't even me who named the files like so.

Hello, jcf

Forward slashes can be found inside id3 tags. And I believe that some batch file renamers replace them with "%2f". For example:
https://github.com/KDE/krename/blob/master/src/batchrenamer.cpp#L825

I hope this satisfies your request