Unquoted directory in desktop_file_to_binary of xdg-mime creates errors when filename contains forbidden characters
Submitted by Dillen Meijboom
Assigned to Jonathan Blandford Blandford @jrb
Link to original bug (#104849)
Description
In the desktop_file_to_binary
function of xdg-mime (version 1.1.2) line 323/325 there is an if statement in bash which checks if a directory exists (at least I think so). It uses an unquoted path which in my case contains forbidden characters in bash. Quoting this path fixes the issue.
Original source (line 323):
if [ -r $dir/applications/$vendor/$app ]; then
Fixed source (line 323):
if [ -r "$dir/applications/$vendor/$app" ]; then