Added in rudimentary category support for dotdesktop file emitting; ie: PXML's catego...
[pandora-libraries.git] / lib / pnd_pndfiles.c
index d249636..b18f23f 100644 (file)
@@ -3,6 +3,8 @@
 #include <stdlib.h> /* for malloc */
 #include <ctype.h> /* for isprint */
 #include <unistd.h> /* for fork/exec */
+#include <sys/types.h> /* for wait */
+#include <sys/wait.h> /* for wait */
 
 #define __USE_GNU
 #include <string.h> /* for making strcasestr happy */
@@ -133,17 +135,6 @@ char *pnd_match_binbuf ( char *haystack, unsigned int maxlen, char *needle ) {
   return ( NULL );
 }
 
-void pnd_get_mountpoint ( char *unique_id, char *r_mountpoint, unsigned int mountpoint_len ) {
-
-  if ( ! r_mountpoint ) {
-    return; // sillyness
-  }
-
-  snprintf ( r_mountpoint, mountpoint_len, "%s/%s", PND_MOUNT_PATH, unique_id );
-
-  return;
-}
-
 static unsigned char pnd_pnd_mountie ( char *pndrun, char *fullpath, char *unique_id, unsigned char do_mount ) {
   char *argv [ 20 ];
   int f;
@@ -205,6 +196,10 @@ static unsigned char pnd_pnd_mountie ( char *pndrun, char *fullpath, char *uniqu
     execv ( pndrun, argv );
   } 
 
+  // wait until mountscript actually completes
+  int status = 0;
+  wait ( &status );
+
   return ( 1 );
 }