diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index f70e2cd2d..5a0efa9df 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2010-04-29 Corinna Vinschen + + * dlfcn.cc (get_full_path_of_dll): Handle non-existent file. + 2010-04-29 Corinna Vinschen * mount.cc (struct opt): Add "dos" and "ihash" options. 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; }