mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* libc/posix/execvp.c (execvp): Check path for
trailing slash.
This commit is contained in:
parent
0ac91154fc
commit
11f5b06579
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user