Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2000-04-16 14:53:02 +0400
committerCorinna Vinschen <corinna@vinschen.de>2000-04-16 14:53:02 +0400
commit11f5b06579ab0ae45ff137db29b9d0b4cd9c3d03 (patch)
tree0863c79563f5f80f696c95b4fc091ea980e14486
parent0ac91154fc664eaed66a8a286069b916adf34e25 (diff)
* libc/posix/execvp.c (execvp): Check path for
trailing slash.
-rw-r--r--newlib/ChangeLog5
-rw-r--r--newlib/libc/posix/execvp.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 33b0ef33d..0e4030e5e 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,8 @@
+Sun Apr 16 12:45:00 2000 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/posix/execvp.c (execvp): Check path for
+ trailing slash.
+
Fri Mar 31 20:39:00 2000 Corinna Vinschen <corinna@vinschen.de>
* libc/include/sys/unistd.h: Add prototypes for
diff --git a/newlib/libc/posix/execvp.c b/newlib/libc/posix/execvp.c
index 6957f61b2..15b2e572c 100644
--- a/newlib/libc/posix/execvp.c
+++ b/newlib/libc/posix/execvp.c
@@ -73,7 +73,7 @@ _DEFUN (execvp, (file, argv),
{
strccpy (buf, path, PATH_DELIM);
/* An empty entry means the current directory. */
- if (*buf != 0)
+ if (*buf != 0 && buf[strlen(buf) - 1] != '/')
strcat (buf, "/");
strcat (buf, file);
if (execv (buf, argv) == -1 && errno != ENOENT)