Add quotes to exec command in mu find #311

Closed
wants to merge 1 commit into from

2 participants

@iltempo

I came across this when I was trying to find messages and show it in less mu find whatever --exec "less".

If messages are found in paths containing spaces like ~/Mail/account/[Gmail] All Messages/, less is called with the parts and won't find the files.

@djcb
Owner

Ah, good catch. However, the fix should probably also handle e.g. where there's are quotation marks etc. in the string.

@iltempo

I'm not a C expert. But as it seems putting double quotes around the file name should solve the problem. Double quotes are escaped. http://developer.gimp.org/api/2.0/glib/glib-String-Utility-Functions.html#g-strescape

@djcb
Owner

This is solved now, using g_shell_quote.

@djcb djcb closed this Nov 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment