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
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2005-10-12 16:54:34 +0400
committerCorinna Vinschen <corinna@vinschen.de>2005-10-12 16:54:34 +0400
commit48882f9a07b5fcc2a892387d9af079a774482f1e (patch)
tree292ce841ef3e850563965fa9ff594d7631394cc7 /winsup
parentc3a1f48c42f8c805d48e5d85049b74ccff3b824c (diff)
* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Convert an
ERROR_INVALID_FUNCTION into an ERROR_FILE_NOT_FOUND. Add comment to explain why.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc9
2 files changed, 13 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 891e58189..a6823a859 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-12 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Convert an
+ ERROR_INVALID_FUNCTION into an ERROR_FILE_NOT_FOUND. Add comment
+ to explain why.
+
2005-10-11 Christopher Faylor <cgf@timesys.com>
* Makefile.in: Make sure that directories are created prior to copying
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 960e0f8ff..48904788e 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -1281,11 +1281,16 @@ fhandler_disk_file::rmdir ()
&& SetCurrentDirectory (windows_system_directory))
continue;
- /* On 9X ERROR_ACCESS_DENIED is returned
- if you try to remove a non-empty directory. */
+ /* On 9X ERROR_ACCESS_DENIED is returned if you try to remove a
+ non-empty directory. */
if (err == ERROR_ACCESS_DENIED
&& wincap.access_denied_on_delete ())
err = ERROR_DIR_NOT_EMPTY;
+ /* ...and, that's *not* funny, when trying to remove a non-existing
+ directory on a share, which is hosted by a 9x machine, the error
+ code ERROR_INVALID_FUNCTION is returned. */
+ else if (err == ERROR_INVALID_FUNCTION)
+ err = ERROR_FILE_NOT_FOUND;
__seterrno_from_win_error (err);