summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 65c09525a..25d2174bd 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -615,6 +615,8 @@ path_conv::check (const char *src, unsigned opt,
to the symbolic link. */
if ((p = strrchr (path_copy, '/')) == NULL)
p = path_copy;
+ else if (p == path_copy)
+ p++;
*p = '\0';
char *headptr;