* path.cc (path_conv::check): Don't generate ENOENT for non-existant

CYGDRIVE and NETDRIVE paths.  Add comment.
This commit is contained in:
Corinna Vinschen 2010-12-06 13:09:40 +00:00
parent a6398b2ffe
commit 9de485e8e0
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-12-06 Corinna Vinschen <corinna@vinschen.de>
* path.cc (path_conv::check): Don't generate ENOENT for non-existant
CYGDRIVE and NETDRIVE paths. Add comment.
2010-12-02 Corinna Vinschen <corinna@vinschen.de>
* net.cc (get_xp_ifs): Fix counting of idx to return stable interface

View File

@ -1035,8 +1035,15 @@ out:
is used on it. */
dev.parse (FH_FS);
}
else if (isvirtual_dev (dev.devn) && fileattr == INVALID_FILE_ATTRIBUTES)
else if (isproc_dev (dev.devn) && fileattr == INVALID_FILE_ATTRIBUTES)
{
/* FIXME: Usually we don't set error to ENOENT if a file doesn't
exist. This is typically indicated by the fileattr content.
So, why here? The downside is that cygwin_conv_path just gets
an error for these paths so it reports the error back to the
application. Unlike in all other cases of non-existant files,
for which check doesn't set error, so cygwin_conv_path just
returns the path, as intended. */
error = ENOENT;
return;
}