aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2006-01-31 14:43:37 +0000
committerCorinna Vinschen <corinna@vinschen.de>2006-01-31 14:43:37 +0000
commit735229ff4ff9eae6f1412fd21f18e9189060024f (patch)
tree2f1ce7a68b971c0e2be023999ffa6ef05a4a3494 /winsup/cygwin/path.cc
parent82cac98f3eb00f33900cc0be235c89ee94f776ae (diff)
downloadnewlib-735229ff4ff9eae6f1412fd21f18e9189060024f.zip
newlib-735229ff4ff9eae6f1412fd21f18e9189060024f.tar.gz
newlib-735229ff4ff9eae6f1412fd21f18e9189060024f.tar.bz2
* path.cc (cwdstuff::set): When SetCurrentDirectory returns
ERROR_INVALID_FUNCTION, bend it over to ERROR_FILE_NOT_FOUND. Add comment to explain why.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index a141c06..73ea908 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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;
}