diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2000-04-16 10:53:02 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2000-04-16 10:53:02 +0000 |
commit | 11f5b06579ab0ae45ff137db29b9d0b4cd9c3d03 (patch) | |
tree | 0863c79563f5f80f696c95b4fc091ea980e14486 /newlib/libc/posix | |
parent | 0ac91154fc664eaed66a8a286069b916adf34e25 (diff) | |
download | newlib-11f5b06579ab0ae45ff137db29b9d0b4cd9c3d03.zip newlib-11f5b06579ab0ae45ff137db29b9d0b4cd9c3d03.tar.gz newlib-11f5b06579ab0ae45ff137db29b9d0b4cd9c3d03.tar.bz2 |
* libc/posix/execvp.c (execvp): Check path for
trailing slash.
Diffstat (limited to 'newlib/libc/posix')
-rw-r--r-- | newlib/libc/posix/execvp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/posix/execvp.c b/newlib/libc/posix/execvp.c index 6957f61..15b2e57 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) |