Handle .desktop files with spaces in filename (rhbz#520920)
authorJindrich Novy <jnovy@redhat.com>
Thu, 3 Sep 2009 05:57:34 +0000 (07:57 +0200)
committerJindrich Novy <jnovy@redhat.com>
Thu, 3 Sep 2009 05:57:34 +0000 (07:57 +0200)
- thanks to Edward Sheldrake

scripts/desktop-file.prov

index ead3c13..abb79f9 100755 (executable)
@@ -9,7 +9,7 @@ OLD_IFS="$IFS"
 while read instfile ; do
        case "$instfile" in
        *.desktop)
-               mime=`cat $instfile | grep MimeType= | cut -d'=' -f2`
+               mime=`cat "$instfile" | grep MimeType= | cut -d'=' -f2`
                 IFS=';'
                for type in $mime ; do
                        echo 'mimehandler('$type')'