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.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index b2e1a7975..cc9d647dd 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -474,6 +474,11 @@ path_conv::check (const char *src, unsigned opt,
/* devn should not be a device. If it is, then stop parsing now. */
if (devn != FH_BAD)
{
+ if (component)
+ {
+ error = ENOTDIR;
+ return;
+ }
fileattr = 0;
goto out; /* Found a device. Stop parsing. */
}