* path.cc (cwdstuff::set): When SetCurrentDirectory returns

ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND.  Add
	comment to explain why.
This commit is contained in:
Corinna Vinschen 2006-01-31 14:43:37 +00:00
parent 82cac98f3e
commit 735229ff4f
2 changed files with 16 additions and 0 deletions

View File

@ -1,3 +1,15 @@
2006-01-31 Corinna Vinschen <corinna@vinschen.de>
* path.cc (cwdstuff::set): When SetCurrentDirectory returns
ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND. Add
comment to explain why.
2006-01-31 Corinna Vinschen <corinna@vinschen.de>
* dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
* include/cygwin/version.h: Bump API minor number to 152.
(CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
2006-01-30 Corinna Vinschen <corinna@vinschen.de>
* fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Simplify

View File

@ -3975,6 +3975,10 @@ cwdstuff::set (const char *win32_cwd, const char *posix_cwd, bool doit)
cwd_lock.acquire ();
if (doit && !SetCurrentDirectory (win32_cwd))
{
/* When calling SetCurrentDirectory for a non-existant dir on a
Win9x share, it returns ERROR_INVALID_FUNCTION. */
if (GetLastError () == ERROR_INVALID_FUNCTION)
SetLastError (ERROR_FILE_NOT_FOUND);
__seterrno ();
goto out;
}