[Portland-bugs] [Bug 25563] xdg-mime default displays error when kde is not on the machine

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Dec 17 11:07:49 PST 2009


http://bugs.freedesktop.org/show_bug.cgi?id=25563


Rex Dieter <rdieter at math.unl.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #2 from Rex Dieter <rdieter at math.unl.edu>  2009-12-17 11:07:49 PST ---
Fixed in cvs.

Index: xdg-mime.in                                                              
===================================================================             
RCS file: /cvs/portland/portland/xdg-utils/scripts/xdg-mime.in,v                
retrieving revision 1.46                                                        
diff -u -3 -p -r1.46 xdg-mime.in                                                
--- xdg-mime.in 31 Jul 2009 06:42:46 -0000      1.46                            
+++ xdg-mime.in 17 Dec 2009 19:06:35 -0000                                      
@@ -106,12 +106,16 @@ make_default_kde()
     vendor="$1"
     mimetype="$2"
     if [ x"$KDE_SESSION_VERSION" = x"4" ]; then
-        default_dir=`kde4-config --path xdgdata-apps | cut -d ':' -f 1`
+        default_dir=`kde4-config --path xdgdata-apps 2> /dev/null | cut -d ':'
-f 1`
         default_file="$default_dir/mimeapps.list"
     else
-        default_dir=`kde-config --path config | cut -d ':' -f 1`
+        default_dir=`kde-config --path config 2> /dev/null | cut -d ':' -f 1`
         default_file="$default_dir/profilerc"
     fi
+    if [ -z "$default_dir" ]; then
+        DEBUG 2 "make_default_kde: No kde runtime detected"
+        return
+    fi
     DEBUG 2 "make_default_kde $vendor $mimetype"
     DEBUG 1 "Updating $default_file"
     mkdir -p "$default_dir"


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Portland-bugs mailing list