summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/path.cc5
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 505a6b700..0c467fded 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,9 @@
2006-01-31 Corinna Vinschen <corinna@vinschen.de>
+ * path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno.
+
+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.
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;
}
}