diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 505a6b700..0c467fded 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2006-01-31 Corinna Vinschen + + * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno. + 2006-01-31 Corinna Vinschen * path.cc (cwdstuff::set): When SetCurrentDirectory returns diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 73ea90831..f23debb8a 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -3978,8 +3978,9 @@ cwdstuff::set (const char *win32_cwd, const char *posix_cwd, bool doit) /* 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 (); + set_errno (ENOENT); + else + __seterrno (); goto out; } }