* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Convert an

ERROR_INVALID_FUNCTION into an ERROR_FILE_NOT_FOUND.  Add comment
	to explain why.
This commit is contained in:
Corinna Vinschen 2005-10-12 12:54:34 +00:00
parent c3a1f48c42
commit 48882f9a07
2 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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);