diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-04-29 17:03:30 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-04-29 17:03:30 +0400 |
commit | 2b749986add04350de7a54cd1456dc65ec427f16 (patch) | |
tree | 4d0b8520d8a416f5c59087fbfa5694f60c816dd5 /winsup/cygwin/dlfcn.cc | |
parent | ef3df0bb7d039d7e933db3b6b9a6db3c57968ff9 (diff) |
* dlfcn.cc (get_full_path_of_dll): Handle non-existent file.
Diffstat (limited to 'winsup/cygwin/dlfcn.cc')
-rw-r--r-- | winsup/cygwin/dlfcn.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/dlfcn.cc b/winsup/cygwin/dlfcn.cc index fb3df2c5f..f63956365 100644 --- a/winsup/cygwin/dlfcn.cc +++ b/winsup/cygwin/dlfcn.cc @@ -58,10 +58,10 @@ get_full_path_of_dll (const char* str, path_conv &real_filename) ?: check_path_access ("/usr/lib", name, real_filename)) == NULL) real_filename.check (name, PC_SYM_FOLLOW | PC_NOFULL | PC_NULLEMPTY); - if (!real_filename.error) + if (!real_filename.error && real_filename.exists ()) return true; - set_errno (real_filename.error); + set_errno (real_filename.error ?: ENOENT); return false; } |