* path.cc (cwdstuff::set): Don't try to open directory on systems not
supporting that.
This commit is contained in:
parent
a83c59fbc3
commit
2156546df2
|
@ -1,3 +1,8 @@
|
|||
2006-12-05 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* path.cc (cwdstuff::set): Don't try to open directory on systems not
|
||||
supporting that.
|
||||
|
||||
2006-12-05 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* dcrt0.cc (get_cygwin_startup_info): Fix comment.
|
||||
|
|
|
@ -4214,6 +4214,8 @@ cwdstuff::set (const char *win32_cwd, const char *posix_cwd, bool doit)
|
|||
set_errno (ENOTDIR);
|
||||
goto out;
|
||||
}
|
||||
if (wincap.can_open_directories ())
|
||||
{
|
||||
HANDLE h = CreateFile (win32_cwd, GENERIC_READ, wincap.shared (),
|
||||
NULL, OPEN_EXISTING,
|
||||
FILE_FLAG_BACKUP_SEMANTICS, NULL);
|
||||
|
@ -4225,6 +4227,7 @@ cwdstuff::set (const char *win32_cwd, const char *posix_cwd, bool doit)
|
|||
CloseHandle (h);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* If there is no win32 path or it has the form c:xxx, get the value */
|
||||
if (!win32_cwd || (isdrive (win32_cwd) && win32_cwd[2] != '\\'))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue