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>2005-04-16 21:17:33 +0400
committerCorinna Vinschen <corinna@vinschen.de>2005-04-16 21:17:33 +0400
commit68401acd245a423c8d3f4c82d9ba215dfa5ecf86 (patch)
tree6d343d5c6288f75b8d0028edbf4ea4f400feb4a5 /winsup/cygwin/path.cc
parent68a3f0d34af960ecb1da72ce70819189a3b6dd29 (diff)
* fhandler_disk_file.cc (fhandler_base::utimes_fs): Ignore
ERROR_NOT_SUPPORTED to workaround Win9x weirdness. * path.cc (symlink_info::check): Remap ERROR_INVALID_FUNTION to ERROR_FILE_NOT_FOUND for the same reason.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index b1d8a4416..8c4f661d4 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3112,7 +3112,14 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt)
matter, so we just return 0. For example, getting the
attributes of \\HOST will typically fail. */
debug_printf ("GetFileAttributes (%s) failed", suffix.path);
- set_error (geterrno_from_win_error (GetLastError (), EACCES));
+
+ /* The above comment is not *quite* right. When calling
+ GetFileAttributes for a non-existant file an a Win9x share,
+ GetLastError returns ERROR_INVALID_FUNCTION. Go figure! */
+ DWORD win_error = GetLastError ();
+ if (win_error == ERROR_INVALID_FUNCTION)
+ win_error = ERROR_FILE_NOT_FOUND;
+ set_error (geterrno_from_win_error (win_error, EACCES));
continue;
}