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
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-01-31 19:10:29 +0300
committerCorinna Vinschen <corinna@vinschen.de>2006-01-31 19:10:29 +0300
commit63a149a18fd9437576cdb81520a2246b14705e57 (patch)
treef44f45894fac407ff2d34c58ac1759988992f9a3
parent735229ff4ff9eae6f1412fd21f18e9189060024f (diff)
* path.cc (cwdstuff::set): Don't set win32 error, only POSIX errno.
-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;
}
}