LRN: Fix .exe extension in transport tests
authorChristian Grothoff <christian@grothoff.org>
Fri, 12 Aug 2011 16:17:05 +0000 (16:17 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 12 Aug 2011 16:17:05 +0000 (16:17 +0000)
src/transport/test_transport_api.c

index 449cd38d0b47ea3791a5d86dbff4f6964addb74f..eb0e406d37b1c84e09732a6bc993815ecb3e9991 100644 (file)
@@ -365,6 +365,7 @@ main (int argc, char *argv[])
 
   char * pch = strdup(argv[0]);
   char * filename = NULL;
+  char *dotexe;
 
   /* get executable filename */
   pch = strtok (pch,"/");
@@ -378,6 +379,9 @@ main (int argc, char *argv[])
   /* remove "lt-" */
 
   filename = strstr(filename, "tes");
+  if (NULL != (dotexe = strstr (filename, ".exe")))
+    dotexe[0] = '\0';
+
   //filename = &filename[1];
   //GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
   //            "`%s'\n",filename);