summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
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 a141c06fd..73ea90831 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;
}