Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-10-02 12:44:08 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-10-02 12:44:08 +0400
commitad2b2724a7efba3e39d6c5b6f4f75f6ec1d4e8bb (patch)
tree27c928fbee2d9768e32c41fbad58aa43cd993999 /winsup/cygwin/fhandler_procsys.cc
parentb66f254618868f72fca74883c440432300d717bd (diff)
* fhandler_procsys.cc (fhandler_procsys::exists): Return virt_none
if path is invalid.
Diffstat (limited to 'winsup/cygwin/fhandler_procsys.cc')
-rw-r--r--winsup/cygwin/fhandler_procsys.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler_procsys.cc b/winsup/cygwin/fhandler_procsys.cc
index 54218156f..0f4cc1747 100644
--- a/winsup/cygwin/fhandler_procsys.cc
+++ b/winsup/cygwin/fhandler_procsys.cc
@@ -62,6 +62,8 @@ fhandler_procsys::exists (struct __stat64 *buf)
InitializeObjectAttributes (&attr, &path, OBJ_CASE_INSENSITIVE, NULL, NULL);
status = NtOpenFile (&h, READ_CONTROL | FILE_READ_ATTRIBUTES, &attr, &io,
FILE_SHARE_VALID_FLAGS, FILE_OPEN_FOR_BACKUP_INTENT);
+ if (status == STATUS_OBJECT_NAME_INVALID)
+ return virt_none;
/* If no media is found, or we get this dreaded sharing violation, let
the caller immediately try again as normal file. */
if (status == STATUS_NO_MEDIA_IN_DEVICE