]> sourceware.org Git - newlib-cygwin.git/commitdiff
* fhandler_registry.cc (fhandler_registry::exists): Handle EACCES.
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 15 Dec 2008 12:51:46 +0000 (12:51 +0000)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 15 Dec 2008 12:51:46 +0000 (12:51 +0000)
(fhandler_registry::open): Ditto.

winsup/cygwin/ChangeLog
winsup/cygwin/fhandler_registry.cc

index 15afc023a791204bd90af6bfb0a482b800f621ae..2b2e8ebde6042cbb97b69161874a8bd29a41715d 100644 (file)
@@ -1,3 +1,8 @@
+2008-12-15  Corinna Vinschen  <corinna@vinschen.de>
+
+       * fhandler_registry.cc (fhandler_registry::exists): Handle EACCES.
+       (fhandler_registry::open): Ditto.
+
 2008-12-15  Corinna Vinschen  <corinna@vinschen.de>
 
        * cygwin.din: Export fgetwc, fgetws, fputwc, fputws, fwide, getwc,
index c45dc1c71632527848b90eee8b78a8dcdd849cf0..cfe4c0712ad1533680f61118112bf33eee9bf450 100644 (file)
@@ -256,7 +256,7 @@ fhandler_registry::exists ()
 
       if (!val_only)
        hKey = open_key (path, KEY_READ, wow64, false);
-      if (hKey != (HKEY) INVALID_HANDLE_VALUE)
+      if (hKey != (HKEY) INVALID_HANDLE_VALUE || get_errno () == EACCES)
        file_type = 1;
       else
        {
@@ -683,7 +683,8 @@ fhandler_registry::open (int flags, mode_t mode)
        handle = open_key (path, KEY_READ, wow64, false);
       if (handle == (HKEY) INVALID_HANDLE_VALUE)
        {
-         handle = open_key (path, KEY_READ, wow64, true);
+         if (get_errno () != EACCES)
+           handle = open_key (path, KEY_READ, wow64, true);
          if (handle == (HKEY) INVALID_HANDLE_VALUE)
            {
              res = 0;
This page took 0.03189 seconds and 5 git commands to generate.