Thanks! Both of these are essentially patches from j-r; the tracker urls are..
[pandora-libraries.git] / lib / pnd_desktop.c
index 3977f19..4bb8130 100644 (file)
@@ -532,8 +532,10 @@ int pnd_map_dotdesktop_categories ( pnd_conf_handle c, char *target_buffer, unsi
   #define MAPCAT(field)                                            \
     if ( ( t = d -> field ) ) {                             \
       match = pnd_map_dotdesktop_category ( c, t );         \
-      strncat ( target_buffer, match ? match : t, len );    \
-      strncat ( target_buffer, ";", len );                  \
+      if ( ( !match ) || ( strcasecmp ( match, "NoCategory" ) ) ) {    \
+       strncat ( target_buffer, match ? match : t, len );  \
+       strncat ( target_buffer, ";", len );                \
+      }                                                     \
     }
 
   MAPCAT(main_category);