aboutsummaryrefslogtreecommitdiffstats
path: root/src/posix-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/posix-util.c')
-rw-r--r--src/posix-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/posix-util.c b/src/posix-util.c
index e78cd771..f7e0a171 100644
--- a/src/posix-util.c
+++ b/src/posix-util.c
@@ -95,7 +95,7 @@ walk_path (const char *pgm)
{
for (s=path, p=fname; *s && *s != ':'; s++, p++)
*p = *s;
- if (*p != '/')
+ if (p != fname && p[-1] != '/')
*p++ = '/';
strcpy (p, pgm);
if (!access (fname, X_OK))