* path.cc (path_conv::check): Tighten FH_CYGDRIVE check to avoid matching

trailing component, like other devices.
This commit is contained in:
Christopher Faylor 2001-11-24 21:05:00 +00:00
parent 3409763ff3
commit 28d3cc021d
2 changed files with 13 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2001-11-24 Christopher Faylor <cgf@redhat.com>
* path.cc (path_conv::check): Tighten FH_CYGDRIVE check to avoid
matching trailing component, like other devices.
2001-11-24 Christopher Faylor <cgf@redhat.com>
* autoload.cc (IsDebuggerPresent): Make conditional load since it is

View File

@ -482,19 +482,16 @@ 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 (devn == FH_CYGDRIVE)
if (component)
{
error = ENOTDIR;
return;
}
if (devn != FH_CYGDRIVE)
fileattr = 0;
else
fileattr = !unit ? FILE_ATTRIBUTE_DIRECTORY
: GetFileAttributes (full_path);
else
{
if (component)
{
error = ENOTDIR;
return;
}
fileattr = 0;
}
goto out; /* Found a device. Stop parsing. */
}