gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r15879 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r15879 - gnunet/src/util
Date: Thu, 7 Jul 2011 18:13:47 +0200

Author: grothoff
Date: 2011-07-07 18:13:46 +0200 (Thu, 07 Jul 2011)
New Revision: 15879

Modified:
   gnunet/src/util/os_installation.c
Log:
fix

Modified: gnunet/src/util/os_installation.c
===================================================================
--- gnunet/src/util/os_installation.c   2011-07-07 16:02:57 UTC (rev 15878)
+++ gnunet/src/util/os_installation.c   2011-07-07 16:13:46 UTC (rev 15879)
@@ -214,8 +214,7 @@
     return NULL;
   path = GNUNET_strdup (p);     /* because we write on it */
   buf = GNUNET_malloc (strlen (path) + 20);
-  pos = path;
-
+  pos = path;  
   while (NULL != (end = strchr (pos, PATH_SEPARATOR)))
     {
       *end = '\0';
@@ -453,15 +452,28 @@
 {
   struct stat statbuf;
   char *p;
+  char *pf;
 #ifdef MINGW
   SOCKET rawsock;
   char *binaryexe;
 
   GNUNET_asprintf (&binaryexe, "%s.exe", binary);
   p = get_path_from_PATH (binaryexe);
+  if (p != NULL)
+    {
+      GNUNET_asprintf (&pf, "%s/%s", p, binaryexe);
+      GNUNET_free (p);
+      p = pf;
+    }
   free (binaryexe);
 #else
   p = get_path_from_PATH (binary);
+  if (p != NULL)
+    {
+      GNUNET_asprintf (&pf, "%s/%s", p, binary);
+      GNUNET_free (p);
+      p = pf;
+    }
 #endif
   if (p == NULL)
     {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]