<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Unquoted directory in desktop_file_to_binary of xdg-mime creates errors when filename contains forbidden characters"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=104849">104849</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unquoted directory in desktop_file_to_binary of xdg-mime creates errors when filename contains forbidden characters
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Portland
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>xdg-utils
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>portland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>info@dmeijboom.nl
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
```</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>