diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-04-16 17:17:33 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-04-16 17:17:33 +0000 |
commit | 68401acd245a423c8d3f4c82d9ba215dfa5ecf86 (patch) | |
tree | 6d343d5c6288f75b8d0028edbf4ea4f400feb4a5 /winsup | |
parent | 68a3f0d34af960ecb1da72ce70819189a3b6dd29 (diff) | |
download | newlib-68401acd245a423c8d3f4c82d9ba215dfa5ecf86.zip newlib-68401acd245a423c8d3f4c82d9ba215dfa5ecf86.tar.gz newlib-68401acd245a423c8d3f4c82d9ba215dfa5ecf86.tar.bz2 |
* 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')
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/path.cc | 9 |
3 files changed, 18 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 64bb229..750773f 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,4 +1,11 @@ 2005-04-16 Corinna Vinschen <corinna@vinschen.de> + + * 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. + +2005-04-16 Corinna Vinschen <corinna@vinschen.de> Pierre Humblet <pierre.humblet@ieee.org> * security.h (cygsidlist::addfromgr): Allow duplicate entries. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 902e40a..280aa07 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -870,7 +870,9 @@ fhandler_base::utimes_fs (const struct timeval *tvp) DWORD errcode = GetLastError (); if (is_fs_special ()) SetFileAttributes (pc, pc); - if (!res) + /* Opening a directory on a 9x share from a NT machine works(!), but + then the SetFileTimes fails with ERROR_NOT_SUPPORTED. Oh well... */ + if (!res && errcode != ERROR_NOT_SUPPORTED) { close (); __seterrno_from_win_error (errcode); diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index b1d8a44..8c4f661 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; } |